Publishing System Settings Logout Login Register
10 examples of using find command in UNIX
TutorialCommentsThe AuthorReport Tutorial
Tutorial Avatar
Add to Favorites
Posted on May 7th, 2011

This article is in continuation of my earlier article Top 10 basic networking Commands in Unix and Top 10 most useful CVS command in Unix .

Here Iam listing down some of the way I use find command regularly, I hopethis would help some one who is new in UNIX and find command or anydeveloper who has started working on UNIX environment. this list is byno means complete and just some of my favorites , if you have somethingto share please share via commenting.

1) Running the last executed find command in Unix:
Thiswill repeat the last find command executed. It saves lot of time if youre searching for something and you need to execute same command againand again. In fact "!" can be used with any command to invoke previous run of that command.

2) Finding files which has been modified less than one day in Unix:
find . -mtime -1

Thisis my favorite while looking out some issue just to check which fileshave been modified recently which could be likely cause of  issue,believe me it helps a lot and many a times gives you enough hint of anyproblem due to intended or unintended file change.

3) List all the files and directories in the box which holds the 777 permission in Unix?
find . -perm 777 –print

I usethis command to find out all the executable files , you can also modifyit to find all the read only files or files having write permission etcby changing permissions e.g. to find all read only files in currentdirectory : find . –perm 555
Here "." or period denotes current directory. You can replace it with any directory you want.

4) How to do case insensitive search using find command in Unix? Use option “-i" with name, by default find searches are case sensitive.
find . –iname "error" –print

fore more tips plese see here Top 10 examples find command in  Unix

Dig this tutorial?
Thank the author by sending him a few P2L credits!


This author is too busy writing tutorials instead of writing a personal profile!
View Full Profile Add as Friend Send PM
Pixel2Life Home Advanced Search Search Tutorial Index Publish Tutorials Community Forums Web Hosting P2L On Facebook P2L On Twitter P2L Feeds Tutorial Index Publish Tutorials Community Forums Web Hosting P2L On Facebook P2L On Twitter P2L Feeds Pixel2life Homepage Submit a Tutorial Publish a Tutorial Join our Forums P2L Marketplace Advertise on P2L P2L Website Hosting Help and FAQ Topsites Link Exchange P2L RSS Feeds P2L Sitemap Contact Us Privacy Statement Legal P2L Facebook Fanpage Follow us on Twitter P2L Studios Portal P2L Website Hosting Back to Top