Linux command--find

Source: Internet
Author: User

In Linux, if we have too many files, it is unrealistic to look for it slowly, so we need to search using the search tool, which describes a search command: find

Basic usage Syntax:

Find directory-name keyword-print

This command means to view a file in a directory that has the keyword (which can be a directory, can be a file name) and output it to the screen!

[Email protected]:~# Find/-name test-print/usr/src/linux-headers-4.9.0-kali3-amd64/include/config/usb/ehset/test/ usr/src/linux-headers-4.9.0-kali3-amd64/include/config/test/usr/src/linux-headers-4.9.0-kali3-amd64/include/ Config/v4l/test


In addition we can use-type to specify what to look for

[Email protected]:~# find/var/www/-name Index.html-type f-print/var/www/html/jaxsec/index.html/var/www/html/ Index.html[email protected]:~# find/var/www/-name www-type d-print/var/www/[email protected]:~#
b--block device file, f--Normal file, d--directory file, l--symbolic link file


This command to find the file is relatively slow, the next command will introduce locate this command, but also find files, but faster!


This article is from the "eth10" blog, make sure to keep this source http://eth10.blog.51cto.com/13143704/1956442

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.