Linux Learning Notes (10)

Source: Internet
Author: User

A. Find command

1.ctrl some usage.


Ctrl d exits a terminal

CTRL C Exits a command

CTRL a cursor starts from the beginning

CTRL u cursor in front of all Delete commands

CTRL d cursor after the command one character delete

Ctrl-e cursor moves to the last


2. Similar to the Find command, Whereis which in advance in a prepared library, a library that is updated regularly every day.

The locate command is similar to Whereis.

Yum Install Locate-y

The first time you use the prompt without a/vat/lib/mlocate/mlocate.db file.

Execute updatedb generate file or library just fine

650) this.width=650; "Src=" Https://s5.51cto.com/oss/201710/25/6ed9622769c6b8cc00af1ecf4a5c72e7.png-wh_500x0-wm_3 -wmp_4-s_2705252452.png "title=" 1.png "alt=" 6ed9622769c6b8cc00af1ecf4a5c72e7.png-wh_ "/>

3.find Command Basic usage usage

Find + Path

-type d directory F file l soft connect C string device B block device

-name + "file name"

650) this.width=650; "Src=" Https://s1.51cto.com/oss/201710/25/889bce297453cc60cd52057bd3fb716c.png-wh_500x0-wm_3 -wmp_4-s_3513064037.png "title=" 1.png "alt=" 889bce297453cc60cd52057bd3fb716c.png-wh_ "/>

Stat + file name (view file details)

Find

-O or meaning

-mtime recently changed time or created file time, file contents. -11 days or less, +1 greater than one day,

-atime last access time, cat or VI

-ctime Recent changes, changes in inode correlation, time, filename, permissions

Law: If you change the contents of the file (Mtime), the CTime will change. Conversely, it is not necessarily

650) this.width=650; "Src=" Https://s4.51cto.com/oss/201710/25/50107b936512f4fb3fd2fd67f050941d.png-wh_500x0-wm_3 -wmp_4-s_3370339217.png "title=" 1.png "alt=" 50107b936512f4fb3fd2fd67f050941d.png-wh_ "/>

-inum + inode number view hard links (here the culprit has a bug, must add path/, otherwise not found)

650) this.width=650; "Src=" Https://s3.51cto.com/oss/201710/25/6a4e15145f2f88f0150bc6b9cf14d6d9.png-wh_500x0-wm_3 -wmp_4-s_3620031533.png "title=" 1.png "alt=" 6a4e15145f2f88f0150bc6b9cf14d6d9.png-wh_ "/>

-mmin-60 within one hour.

-size file size must be given to a unit, +10k greater than 10k, -10k less than 10k m trillion,

650) this.width=650; "Src=" Https://s1.51cto.com/oss/201710/25/f3a7adae5a68443a26453533f9e919be.png-wh_500x0-wm_3 -wmp_4-s_4117788864.png "title=" 2.png "alt=" F3a7adae5a68443a26453533f9e919be.png-wh_ "/>

-exec ls-l {} \; ls-l out the found file. {} Find out the list of files.

-exec mv {} {}.bak\; the files found by Ls-l are appended with the file name through the MV. Bak.

650) this.width=650; "Src=" Https://s1.51cto.com/oss/201710/25/2537b5e10f59b53cf9eac7ce6bbc8320.png-wh_500x0-wm_3 -wmp_4-s_2580957222.png "title=" 3.png "alt=" 2537b5e10f59b53cf9eac7ce6bbc8320.png-wh_ "/>

Second, the file suffix name

Linux commands are case-sensitive

Most Linux files have suffix names, but they are not rigorous and do not represent the type of file.

Contract the same file with the same suffix name.

lang=en display into English

Lang=zh_cn. UTF-8 Display into Chinese



Linux Learning Notes (10)

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.