Several shell questions

Source: Internet
Author: User

1. for I in $ (seq 0 9); do touch file $1; done
2. sort-k 1-t ': 'passwd | awk-F': ''{print $3": "$4": "$5 }'
3. diff-B file1 file2
4. isodump-I out. iso-x/media/cdrom; umount/media/cdrom # the usage of cdrom is not considered.
5. dd if =/dev/zero of = ~ /Outfile bs = 1G count = 1
6. ifconfig eth0
7. netstat-a | grep tcp
8. tar cjf/buckup/home.tar. bz/home | rm-f/buckup/home.tar. bz

Reply by referencing the author baby313:

1. Create file0, file1 ,... And file9 files.
2. Sort the/etc/passwd file by the first field separated by ":" and output the third row to the fifth line.
3. Compare whether the two files are the same (ignore empty rows ).
4. Create an iso file from the CD, and then pop up the CD.
5. Generate a 1 GB file.
6. display the NIC information of the system.
7. Count the total number of TCP connections in the current system.
8. Back up and compress all files in the/home directory. If the backup is successfully copied to the/backup Directory.

Use one statement for each question !!!

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.