Simple linux command

Disk
cd Change directory
ll query the directory list
mkdir to create a directory
rmdir remove directory
pwd query the current directory absolute position

File Browser
cat queries all content
more | less Paged view
tail -10 last 10
tail -f monitor

File Finder
find directory -name 'condition'

File operations
touch to create a new file
mv move files | rename
cp copy
rm -rf delete

Document editing
vi or vim -> Command Mode -> (i) -> Edit mode -> (ESC) -> Command Mode ->: (!: Q) (wq)

Backup Compression
tar -zcvf compressed
tar -zxvf decompression

System command
ifconfig to view ip address
ps aux | grep -i keyword specifies the name of the process view

Permissions
chmod 777 permissions granted to all

The / home directory below a directory mydata compressed mydata.zip
  compression mydata directory -R & lt mydata.zip mydata # ZIP
2, the / home directory of directory mydatabak mydata.zip extract to
  the unzip mydata.zip -d mydatabak
. 3, the / home directory of folders and abc 123.txt compressed into abc123.zip
  ZIP -R & lt abc123.zip 123.txt abc
. 4, the / home directory directly below wwwroot.zip decompression / home directory
  the unzip wwwroot.zip
. 5 , the / home directory below abc12.zip, abc23.zip, abc34.zip simultaneously extract to / home directory inside
  the unzip .zip abc *
6, see the / home directory inside the content of wwwroot.zip
  unzip -v wwwroot. ZIP
. 7, verification / home directory below wwwroot.zip is complete
  the unzip -t wwwroot.zip
. 8, to extract all files / home directory wwwroot.zip inside the first level directory
  unzip -j wwwroot.zip

Guess you like

Origin www.cnblogs.com/kai-kai/p/11505504.html
Recommended