Searching for files and renaming in batches in linux

Source: Internet
Author: User

In linux, find files and rename the cause in batches: when a package name was incorrectly spelled in the previous development project, and then the people behind it copied and pasted all the errors. Now, correct this small bug, I used several linux commands, but I was not familiar with them. Now let's take a look. ======== In a directory, find the file 1cd/workspace/2 find with the name agnet. -name '* agnet *': rename all the files whose names contain agnet to the agent file name 1 rename agnet agent * agnet *. The first parameter is the original feature character, the second is the target character you want to change. The last one is the target file name, which can contain * or?

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.