Linux Learning Notes (ix) find, filename suffix

Source: Internet
Author: User
Tags clear screen

One
There are many ways to find files in Linux, such as which, Whereis, and locate, which have been used before.
If you do not have locate installed, you need to run

yum  install -y  mlocate

Installation
The first time the data file does not exist,
Enter UpdateDB,
For specific usage, see
Http://man.linuxde.net/locate_slocate

Second, Linux common shortcut keys
Ctrl L Clear Screen
D (current command behavior is empty) Exit current terminal
C Discard the current command line
U delete the character before the cursor to the beginning of the line
K Delete the character before the cursor to the end of the line
A cursor moves to the front of the command line
e cursor moves to the command line at the end
H Delete from cursor position by word Fu Xiangmai
D remove by character backwards from cursor position
Z Pauses the current process
Third, find command

find  /root/ -type f -mmin -60       

Files that have been modified within 60 minutes

find  /root/ -type f -mtime -1       

Files that have been modified within one day

find  /root/ -type f -mtime   +1   

Files that have been modified a day ago

find  / -inum   21111212

Inote number 21111212 File

find /tmp/chen/  -type f -mmin -60 -exec ls -l {} \;

Ls-l operations on Find-out files

find /tmp/chen/  -type f -mmin -60 -exec mv {} {}.bak \;

Add the. bak file name after find out

-type Specifying file types
D folder
F file
L Link
C Serial Device
B Block
Atime the last time to view or open
Mtime the last time the content was modified
CTime Last modified permission: Time
Mtime change when the CTime must change, the contrary does not set
The stat command is used to view details such as the three time inote number of a file

-size file size k, M

-type-size These conditions are not added to-O is all conditions are established
If it is
-type F-mmin-60-o-size +10m
Find files that have been modified within 60 minutes or files larger than 10M in size

Iv. name of the file suffix
The file suffix name in Linux has no practical effect on Linux, such as. txt. Sh. pl\
These are Linux managers to facilitate management, the same type of files with the same suffix name, easy to identify and manage.

Linux Learning Notes (ix) find, filename suffix

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.