cat (Concatenate and display files)
cat  file.txt
cat  file1.txt file2.txt
cat  file1.txt file2.txt >  combined.txt
cat  -n  file.txt
tac (Display file contents in reverse)
tac  file.txt
more (View file contents one page at a time)
more  file.txt
more  +/keyword file.txt
less (View file contents interactively)
less  file.txt
less  file.txt
head (Display the beginning of a file)
head  file.txt
head  -n  20  file.txt
head  -c  100  file.txt
tail (Display the end of a file)
tail  file.txt
tail  -n  20  file.txt
tail  -f  file.txt
nl (Number lines of files)
nl  file.txt
od (Dump files in octal and other formats)
od -x  file.txt
wc (Word, line, character, and byte count)
wc  file.txt
wc  -l  file.txt
wc  -w  file.txt
wc  -c  file.txt
diff (Compare files line by line)
diff  file1.txt file2.txt
diff  -y  file1.txt file2.txt
diff  -r  dir1/ dir2/
cp (Copy files and directories)
cp  source.txt destination.txt
cp  file1.txt file2.txt directory/
cp  -r  source_directory/ destination_directory/
mv (Move or rename files and directories)
mv  source.txt /path/to/destination/
mv  oldname.txt newname.txt
mv  source_directory/ /path/to/destination/
rm (Remove files and directories)
rm  file.txt
rm  -f  file.txt
rm  -r  directory/
rm  -rf  directory/
mkdir (Make directories)
mkdir  new_directory
mkdir  -p  parent_directory/child_directory
rmdir (Remove empty directories)
rmdir  empty_directory
rmdir  -p  parent_directory/child_directory
split (Split a file into pieces)
split  -l  1000  largefile.txt smallfile_
split  -b  1M largefile.txt smallfile_
rename (Rename files)
rename  's/\.txt$/\.md/'  *.txt
rename  's/file/newfile/'  file*
shred (Securely delete files)
shred -u  file.txt
shred -n  5  file.txt
find (Search for files in a directory hierarchy)
find  /path/to/search -name  "filename" 
find  /path/to/search -type  d
find  /path/to/search -size  +1M
find  /path/to/search -mtime  -1 
find  /path/to/search -perm  755 
locate (Find files by name using a pre-built database)
locate  filename
sudo  updatedb
grep (Search text using patterns)
grep  "search_string"  file.txt
grep  -r  "search_string"  /path/to/search
grep  -n  "search_string"  file.txt
grep  -i  "search_string"  file.txt
grep  -l  "search_string"  /path/to/search/*
which (Locate a command)
which  ls 
whereis (Locate the binary, source, and manual page files for a command)
whereis  ls 
type (Describe a command type)
type  ls 
chmod (Change file mode bits)
chmod  +x script.sh
chmod  755  file.txt
chmod  -R  755  directory/
chown (Change file owner and group)
chown  new_owner file.txt
chown  new_owner:new_group file.txt
chown  -R  new_owner:new_group directory/
chgrp (Change group ownership)
chgrp  new_group file.txt
chgrp  -R  new_group directory/
umask (Set file mode creation mask)
umask 
umask  022
setfacl 和 getfacl (Set and get file access control lists)
setfacl -m  u:username:rwx file.txt
getfacl file.txt
tar (Archive files)
tar  -cvf  archive.tar directory/
tar  -xvf  archive.tar
tar  -czvf  archive.tar.gz directory/
tar  -xzvf  archive.tar.gz
tar  -cjvf  archive.tar.bz2 directory/
tar  -xjvf  archive.tar.bz2
zip 和 unzip (Compress and decompress zip files)
zip  archive.zip file1 file2
zip  -r  archive.zip directory/
unzip  archive.zip
gzip 和 gunzip (Compress and decompress gz files)
gzip  file.txt
gunzip file.txt.gz
zcat file.txt.gz
bzip2 和 bunzip2 (Compress and decompress bz2 files)
bzip2  file.txt
bunzip2  file.txt.bz2
xz 和 unxz (Compress and decompress xz files)
xz file.txt
unxz file.txt.xz
7z (Compress and decompress 7z files)
7z a archive.7z file.txt
7z x archive.7z
file (Determine file type)
file  file.txt
basename 和 dirname (Extract file name and directory name)
basename  /path/to/file.txt
dirname  /path/to/file.txt
xargs (Build and execute command lines from standard input)
ls  *.txt |  xargs  rm 
find  .  -name  "*.log"  |  xargs  tar  -czvf  logs.tar.gz
tee (Read from standard input and write to standard output and files)
echo  "Hello, World!"  |  tee  output.txt
tr (Translate or delete characters)
cat  file.txt |  tr  'a-z'  'A-Z' 
cat  file.txt |  tr  -d  '0-9' 
sort (Sort lines of text files)
sort  file.txt
sort  -r  file.txt
sort  -n  file.txt
uniq (Report or omit repeated lines)
uniq  file.txt
uniq  -d  file.txt
uniq  -c  file.txt
cut (Remove sections from each line of files)
cut  -c  1 -10 file.txt
cut  -d  ','  -f  2  file.csv
paste (Merge lines of files)
paste  file1.txt file2.txt
paste  -d  ','  file1.txt file2.txt
awk (Pattern scanning and processing language)
awk  '{print $2}'  file.txt
awk  'END {print NR}'  file.txt
awk  '{sum += $3} END {print sum}'  file.txt
sed (Stream editor for filtering and transforming text)
sed  's/old_string/new_string/'  file.txt
sed  '/^$/d'  file.txt
sed  -n  '2,4p'  file.txt
echo 和 printf (Display a line of text)
echo  "Hello, World!" 
name = "Alice" 
echo  "Hello, $name !" 
printf  "Name: %s\n Age: %d\n "  "Alice"  25