Linux command----Find

Source: Internet
Author: User

Find command

Common scenarios:
1. When there are multiple directories under the current directory, you want to view the files in all directories at once
2. Show all files in the current directory only
3. Show all directories and subdirectories in the current directory only
4. Perform additional operations on the found file.
5. Only the relevant directories and files are displayed at the current level.
6. Display the soft connection file in the current directory

Answer:
1. >find. Displays all files in the current directory at once, including files under subdirectories
2. >find. -type f//Show all the normal files of the current directory at once, this time will not show the soft connection file;
3. >find. -type d//Show all directories and subdirectories in the current directory at once
4.> find. -type f-name "*test*"-exec ls-l {} \; Show file details that contain the test keyword
5.> find. -maxdepth 1//displays only the relevant directories and files at the current level.
6.>find. -type f//Displays the soft connection file under the current directory, which can be added as-type F.

Linux command----Find

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.