Common CentOS commands: find & Common shortcuts
Common shortcuts
Ctrl + u: Clear ctri + k: Clear ctrl + d: leave the terminal when this action is null. If it is not empty, delete a character ctrl + h: delete the character ctrl + e before the cursor: Move to the cursor ctrl + a: move to the cursor ctrl + f: Move a character ctrl + c: stop the process ctrl + p: repeat the previous command ctrl + l: clear screen
2.23/2.24/2.25/find command
There are four search tools in the system
1. which can only be used to find executable files in the PATH where the PATH environment variable appears. 2. whereis needs to pre-generate a file list library to find files related to the given file name. 3. locate similar to whereis 4, the find format is find [path] [parameter condition-type, -name-mtime] is used by default with multiple conditions, and "-o" is or.
-Atime + n/-n: access or files whose execution time is greater than/or less than n days-ctime + n/-n: change write and modify inode attributes (for example, change owner, permission, or link) files with a time greater than/less than n days-mtime + n/-n: modify files with a write time greater than/less than n days
# (A file whose type is f has been changed if + 1 is greater than 1 day within-1 day) find/-type f-mtime-1
# For files within 2 hours, exec is an option of find, and {} represents the list of files to be found. At last, you need to add one, but you need to remove it. Find/home/ww/-type f-mmin-120-exec ls-l {}\;
# Add the bak suffix find/home/ww/-type f-mmin-120-exec mv {}{}. bak \ To the file found within two hours \;
# Search for files larger than 10 MB and find./-type f-size + 10 M-exec ls-l {}\;
Ls-lrtifind/-inum 50677474 # search for inode and hard-link files
Stat 2.txt # view specific file information (including devices, permissions, various times, inode, etc)
LANG = en # modify the system language echo $ LANG # view the current language
2.26 filename suffixes the filename Suffixes in linux do not have any specific meanings. They are added or not the same. However, to distinguish between them, we are used to adding a suffix at the same time when defining the file name. Common suffixes include: 1. sh indicates that it is a shell script 22.16tar.gz. It indicates that 32.16test.zip indicates a compressed file. 4. my. cnf indicates a configuration file