Linux Shell Advanced Batch processing

Source: Internet
Author: User
Tags bmp image

There is a ' batch ' file in DOS that writes multiple commands into a batch called. bat.

In Linux, it can also be done, and more powerful, I write batch processing is in Ubuntu 12.04 LTS

All I have to do is move the pictures on the USB drive to the computer.

Here is the code implementation:

sudo mount/dev/sdd1//media/cp/media/helloworld/program/*.bmp/home/xyx/ahahtar-zcpvf/home/xyx/ahah/pic ' Date +%Y%m%d '. Tar.gz/media/helloworld/Program/*.bmprm/media/helloworld/Program/*.bmpsudo umount/media/

The first line: Mount first, you can use the command mount to see the next,/media/is a mount point, is my own casually up

Second line: Copy the picture of the USB drive to the Ahah file in the home directory

Third line: Compress, backup.

Line four: Remove the *.bmp image from the USB flash drive

Line five: Uninstall.


Note: In the third row, there is an uppercase P in the command-line argument, and if not, it will be quoted: tar: Remove the "/" from the member name at the beginning

In Linux, the "/" in the absolute path is deleted by default, whether the TAR package is created or unpacked.

Although the results of the execution are the same, you want to keep it in Linux, plus p will be perfect.

This article is from the "Genius Strength" blog, please be sure to keep this source http://8299474.blog.51cto.com/8289474/1534279

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.