File Manipulation Commands
常用檔案處理指令
ls
List files. Options control the information shown.
列出指定目錄下的檔案
cd
Change working directory.
切換目錄
cp
Copy files and directories.
複製檔案
chmod
Change the permissions (mode) of files and directories.
變更檔案之權限
chown
chgrp
Change the owner/group of files and directories.
變更檔案之擁有者/群組
find
Descend one or more directory hierarchies finding filesystem objects (files, directories, special files) that match specified criteria.
找出檔案樹中所有符合條件的檔案
head
tail
Print the first/last n lines of one or more files.
印出一個檔案的前/後 n行
rm
rmdir
Remove files and directories.
刪除檔案或目錄
mkdir
Make directories.
新增目錄
pwd
Print the current working directory.
印出當前工作目錄
cksum
Print a file checksum, POSIX standard algorithm.
用來計算檔案之 checksum
diff
Compare two files, showing differences.
比較兩個檔案,找出相異之處
comm
Print or omit lines that are unique or common between two sorted files.
比較兩個排序過的檔案,找出相同及相異之處
file
Guess the type of data in a file by examining the first part of it.
用來檢查檔案類型的指令。 它可以告訴你檔案是文本文件、二進制文件、壓縮文件還是其他類型的文件。
du
Show disk block usage of files and directories.
計算檔案或目錄的 block 佔用量
df
Show free disk space.
顯示磁碟剩餘空間
touch
Update the modification or access time of a file.
更新檔案的變動或讀取時間
od
Octal dump; print file contents in octal, hexadecimal, or as character data.
將檔案內容用八進位或十六進位印出來
umask
Set the default file-creation permissions mask.
設定檔案創建時的預設權限
tar
Tape archiver. Now used mostly as a software distribution format.
打包一批檔案,原係設計給磁帶機使用,現在都當作一般打包軟體使用
zip
unzip
File archiver and compressor/decompressor.
打包檔案軟體
gzip
gunzip
High-quality file compression and decompression.
打包檔案軟體
bzip2
bunzip2
Very high quality file compression and decompression.
打包檔案軟體