Linux Talent Formation program i--file Search command

Source: Internet
Author: User

File Search: Locate file name

Locate is through the database search, one day update, the day plus should use UpdateDB, update the database

Locate Locate

Locate Search background database:/var/lib/mlocate

can only be searched by file name, but relatively fast

/etc/updatedb.conf Search configuration file

Whereis command name

-B: Look only at the executable file location

-M: see only the Help document location

Can only look at commands that are not from the shell.

which file name

View aliases and command locations

$PATH environment variables, use; split

When you execute the command, go to the path contained in path to find

find [Range] [condition]

Find/–name Install

Search root, by file name

resource-intensive

Wildcard characters:

? Any one

* Any number of

[] One of the parentheses

-iname Case insensitive

-user Search Owner

Find/var/log/–mtime +10 to find Files modified 10 days ago

Atime File access time

CTime changing file properties

-Within 100 days

100 Day

-size 25k File size is exactly 25k, K is lowercase

M is uppercase, is trillion

Not write units is the data block, is a sector, a sector is 512 bytes

-inum number according to the I node number to search

-A logic with meaning

Find/etc–size +20k–a–size–50k to find files larger than 20k less than 50k

-O Logic or

The first command-exec the second command {} \;

Command Two can handle the results of a command search.

grep [Options] string file name

Search for a line in a file containing a string

-V does not contain a string of rows, take the inverse

-I ignores case

Linux Talent Formation program i--file Search command

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.