Home UNIX FIND command
FIND command PDF Print E-mail
Written by Administrator   
Monday, 10 October 2011 05:30

 

Here are the most needed cases when you need to FIND something in your server:

 

1. You want to see the first 50 biggest files in the current location:

find . -xdev -type f -ls | sort +6n | tail -n 50

 

2. You want to all the files which were created TODAY in this specific partition:

find . -mtime -1 -type f -xdev -exec ls -l {} \;

 

3. You want to search only in XML files for the word ERROR :

 

find . -name "*.xml" -exec grep "ERROR" '{}' \; -print

 

4. You want to find in the whole system all the files which contain the word CORE:

find / -name core

 

5. You want to see the last files created in the last 10 min:

find / -mmin -10

Last Updated on Monday, 10 October 2011 05:39
 

Latest News

Popular


Powered by Gabriel Ionescu.