find--file Find command Linux some common commands

Source: Internet
Author: User

Find command
eg

General File Lookup Method:

1. find/home-name file, look for files named file in the/home directory
2. Find/home-name ' *file* ', in the/home directory, look for files with file names
3. Find/home-name ' file* ', looking for files with file names starting with file in the/home directory
4. Find/home-size 512c, look for 512kb size files in the/home directory
5. Find/home-size +1000000c, look for files larger than 1000000kb in the/home directory
6. find/home-size-1000000c, find files less than 1000000kb in the/home directory
7. Find/home-size +1000000c-ls | Less, finds files larger than 1000000kb in the/home directory, and displays details in the form of less command

Based on the characteristics of the file Query method:

8. Find/-amin-10, look for the last 10 minutes of the file accessed in the system
9. Find/-atime-2, look for the last 48 hours of file access in the system
Find files or folders that are empty in the system by finding/-empty
Find/-group cat for files belonging to Groupcat in the system
Find/-mmin-5, look for files that have been modified in the last 5 minutes of the system
Find/-mtime-1, look for files that have been modified in the last 24 hours of the system
Find/-nouser files that belong to obsolete users in the system
Find/-user Rachel, finding files belonging to Rachel This user in the system

To find a file using a hybrid lookup method:

Find/tmp-size +10000000c-and-mtime +2, find a file that is larger than 100000000 bytes and modified within 48 hours in the/tmp directory
Find/tmp-size +10000000c-or-mtime +2, finding a file that is larger than 100000000 bytes or modified within 48 hours in the/tmp directory
Find/tmp! -user Rachel, find all files that are not part of Rachel in the/tmp directory

http://blog.csdn.net/hackerain/article/details/7946193

    1. Tar-zxvf/home/images.tar.gz-c/specificdir//extract to the specified directory
    2. View all current processes

Ps-e

View Extranet IP

Curl Ifconfig.me

    1.   View CPU model   
    2. CAT /PROC/CPUINFO  
    3. ol>
    4.  CP (copy): file copy   
    5.    eg: cp ./test/test1/ file1 ./test/test2 ,  copies file1 files from the Test/test1 directory of the current directory to the Test/test2 directory in the current directory.   
    6.        cp /home/rachel/test/test1/ file1 /home/rachel/test/test2 , copy the File1 file from the/home/rachel/test/test1/directory to the/home/rachel/test/test2 directory.   
    7.        cp -ax ./test/test1/test11 ./ test/test2 ,  Copy the test11 directory and its subdirectories and all the files contained therein to the Test2 directory, < -ax, a (archive) means copying all directories, including subdirectories, X means that the format of this file after copying will be the same as the file system of the target sector >  
    8. &NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;CP  -ax ./test / ,  Copy the test directory and its subdirectories under the current directory to the root directory. (Note that there is a permission limit, you have to use the sudo command to copy)  

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.