Linux Command tips and time settings

Source: Internet
Author: User

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"

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.