Directory
First, Advanced command
Second, the system command
Iii. Compression and archiving
3.1. Archive
3.2. Compression
3.3. Archive and Compress
Archive, Access: TAR-CF, TAR-TVF
Compression, decompression: gzip, gunzip
Archive and Compress: TAR-CZF
Pick up and Unzip: TAR-XZF
First, Advanced command
Find//lists the current directory and subdirectories (including hidden files)|//pipe character, function: Previous command output, as input to the latter commandGrep//Text Search Tool, example: Gerp bash for99.sh search for rows with bash in for99.sh//ll | Gerp for, use of COMBINED commands: ll output, as input to grep, filter rows with for// grep-r: Recursion// grep-i: Ignoring caseXargs//Multiline Transfer Line, example: Grep-ril BASH | cp ' Xargs ' DD//converts all file names with bash strings in the current directory, multiple lines to a single line, and passes them as parameters to CP to copy all files with bash strings to the DDD directoryExpand:. bash_history, storing historical input commands, calling method: Enter history directly
View Help and methods
-H--help //ls--helphelp //helplsman // Man lsinfo //info ls
Second, the Linux system command
Ps-af//List all Processes Ps-efNetstat-anop//list all network processesNano 1.txt &//put the Nano 1.txt in the backgroundJobs//View current task processfg%1//put process number 1th in front of the foreground .bg%1//put it in the backgroundKill [-9] PID//kill Process, [9] Optional: Strong killWC 1.txt//Word statistics for 1.txt content, separated by invisible characters//wc-l number of rows//wc-c number of bytes//wc-w number of wordsDF-ln//View disk fearsFree-h//View memory Status
Iii. Compression and archiving
3.1. Archive: Archive
Tar//Archive to make multiple files complete and to be a single file
TAR-CF Bcd.tar BBB CCC DDD//To archive BBB, CCC, DDD as Bcd.tar
TAR-XF Bcd.tar//Extract, extract all files in Bc.tar
TAR-TVF Bcd.tar//List the contents of Bcd.tar
- Jar//java Archive File
- Har//hadoop Archive file
- War//web archive file
- Ear//enterprise Archive File
3.2. Compression: gzip
Gzip 1.txt//Compress 1.txt
Gunzip 1.txt.gz//Unzip the 1.txt
-Z gzip//Call compression
-C Create//creates a new file
-v verbose//output details
-F File//specify filename
-X Extract//extraction, decompression
3.3, archive and Compress files, archive compressed files for decompression
Tar-czvF bcd.tar.gz BBB CCC DDD//To archive BBB, CCC, DDD and compress to bcd.tar.gz
Tar-xzvF bcd.tar.gz//Unzip the bcd.tar.gz
Linux Basics (05), Advanced Linux commands