Find finds and deletes a file of the specified type.

Source: Internet
Author: User

Find a file of the specified type and delete the Problem description: find the file of the specified type in the current directory solution: (1) find command specific command: find. -maxdepth 1-name '. *. c' parameter description: maxdepth specifies the depth of the subdirectory to be searched. name indicates the file name to be searched. c type file, use '*. c '. Here, the matching of file names is not a regular expression, which indicates. all files at the end of c) Note: You can use the grep command to search here. Note: grep-E is similar to egrep. The search parameter is a regular expression '. *. c' indicates. any file ending with c (2) delete a file of the specified Type COMMAND: find. -maxdepth 1-name '*. c '-delete Note: After you use find to find a file of the specified type, use the-delete parameter to delete the file of the specified type found.

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.