Linxux course _ basic commands and tools (2)

Source: Internet
Author: User
1. obtain the current system time and save the result in the file. 2. find all the hidden files in the root directory.

1. obtain the current system time and save the result in the file.

2. find all the hidden files in the/root directory (the hidden files are only invisible, and the file name starts with ".") and save the results in the hidefile file.

3. the list displays information about all files in the/tmp directory and stores the results in the file allfile.

4. start the vi editor, create a text file, write the information "this is a test", save and exit. Add the duplicate write information "this is a test" at the end of the text file using the additional output redirection ".

5. redirect all file information in the/root directory to the file rootfile.

6. the/etc/fstab file and the/etc/inittab file are displayed consecutively.

7. Merge the file/etc/fstab and file/etc/inittab into/root/mergefile

8. output the first and last two lines of the file/etc/fstab to the file tailheadfstab.

9. recursively display all the file information in the/etc directory, which must be displayed on multiple screens.

10. View historical command information and display it on a split screen.

11. find all rows with the "root" word in the/etc/passwd file.

12. search for all files and folders starting with "I" in/root and its subfolders (for Test commands, you need to create files first ).

13. the file name in the/etc directory contains the 'init 'folder. d ).

14. search for the command history and filter out all commands that contain "rm" or "rmdir" (if this history does not exist, enter these commands first ), and save it in the file rmrecord. it is required to include the filtering time and date at the end of the file.

15. use combined pipeline commands to automatically count online users

16. linux, as a multi-user operating system, allows remote users to use machines through terminal software (in fact, local users also use this method to connect to the system ), try to use the combined pipeline command to filter users from specific ip segments (for example, 192.168.1.100-192.168.1.200, which can be set according to actual network conditions.

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.