1./bin/command: All users
2. cd Shell internal commands, not in any directory
Cd-Return to the last accessed directory
Cd! $ Enter the last accessed directory
Cd ~ And cd are both home directories
3. pwd: print work directory
4. cp:/bin/cp
Cp-a copy directory (including subdirectories)
5. view the File Content
Cat reads all content at a time
More cannot be rolled back. q exits.
Less can be rolled back (FLIP key or direction key)
Head-n filename n indicates the number of rows. The default value is the first 10.
The default value of tail-n filename is the last 10 rows.
Tail-f filename: view Real-Time files, such as log files and the last line of Real-time Monitoring files
6. Create a deep-level directory using mkdir-p
7. view the absolute path of the command and Command help manual
Whatis command_name
8. find [search path] [keyword] [file or directory]
Locate filename is faster (updatedb re-creates a directory database index)
Grep contents_keywords filename
Grep-v "#"/etc/httpd/conf/httpd. conf> http. conf. bak (comment out files, "-v" is excluded)
9. gzip GNU zip
Gzip-1 quick Compression
Gzip-9 compression with high compression ratio
*. Gz suffix
Decompress gunzip
Tar packaging and Compression
Tar-cvf file_newname dir_name
Tar-zcvf mydir.tar.gz mydir/
Decompress tar-zxvf file.gz
Tar-jxvf file.bz2
10. Time settings
Set date-s 20100315 first
Set the date-s.
If you want to change the BIOS time at the same time, execute clock-w
Author: "Xiao K Studio"