常用檔案處理指令
ls
列出指定目錄下的檔案
cd
切換目錄
cp
複製檔案
chmod
變更檔案之權限
chown
chgrp
變更檔案之擁有者/群組
find
找出檔案樹中所有符合條件的檔案
head
tail
印出一個檔案的前/後 n行
rm
rmdir
刪除檔案或目錄
mkdir
新增目錄
pwd
印出當前工作目錄
cksum
用來計算檔案之 checksum
diff
比較兩個檔案,找出相異之處
comm
比較兩個排序過的檔案,找出相同及相異之處
file
用來檢查檔案類型的指令。 它可以告訴你檔案是文本文件、二進制文件、壓縮文件還是其他類型的文件。
du
計算檔案或目錄的 block 佔用量
df
顯示磁碟剩餘空間
touch
更新檔案的變動或讀取時間
od
將檔案內容用八進位或十六進位印出來
umask
設定檔案創建時的預設權限
tar
打包一批檔案,原係設計給磁帶機使用,現在都當作一般打包軟體使用
zip
unzip
打包檔案軟體
gzip
gunzip
打包檔案軟體
bzip2
bunzip2
打包檔案軟體
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.
rm
rmdir
Remove files and directories.
mkdir
Make directories.
pwd
Print the current working directory.
cksum
Print a file checksum, POSIX standard algorithm.
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.
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.