Red Hat Linux Command set (1)

Source: Internet
Author: User

1. The mkdir command is used to create a subdirectory, such as: mkdir data1. 

2. The rmdir command is used to delete files in empty subdirectories or useless directories. eg: rmdir data1 

3. The CP command is used to copy files or directories to other directories. eg: CP file dir CP file1 file2 CP-r sdir ddir

4. The RM command is used to delete files in the directory or the directory itself. rm-R to delete non-empty directories. A prompt is displayed. Rm-RF: delete non-empty directory. No prompt is displayed. 

5. ls is used to display the list of files and subdirectories in the current directory. By configuring different parameters, you can display the contents in different ways. The LS-a ls-l LS-s LS-al

6.cat command is used to display the file content (often used with more) cat filenamecat filename | morecat FILENAME> filename1 redirection 

7.cd command is used to enter the directory CD dir; CD/home ;. CD ..; 

8. the more command is used to display files with more than one screen. 

9. head-count |-N number filename eg: Head-2 filename displays the first and second lines of the file Head- 

10: The CMP command is used to compare the two file sizes. The CMP file file1 CMP-l file file1

11.du command is used to display the remaining disk space. 

12. The file command is used to display the file type. Eg: The file filename

13.cut command is used to remove part of the file. Cut [-CFD] filename-C: Specifies the column position-F: specifies each field (by default, the tab is a character delimiter) eg: Cut-C1, 3 filename remove the character cut-c1-3 filename for columns 1st and 3rd remove the character cut-F1 file cut-

14.wc command from columns 1st to 3rd to display the bytes in the file, number of phrases and texts. Sort by row, number of words, and character display. 

15. The gzip-v file command is used to compress a file in .gz. The maximum compression ratio is 

16. The gunzip filename command is used to decompress the GZIP file. Program 

17. The touch filename command is used to update the file access, modify, and change time to the current system time. You can use LS-l filename for viewing. 

18. The uniq command is used to remove duplicate text lines from a classified file. Uniq-C filename displays the number of times the text line is repeated. 

19. locate filename: locates the path of the file. 20. rpm format: rpm-I package_file to install a software package. format: rpm-e package_file Uninstall a software package. format: rpm-Qa | more view the software packages installed on the local machine.

 


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.