Find Command and its attribute in Linux .

Finding a File inside a collection of files made tough . sometimes you may forgotten the filename , but you remember that you have accessed or modified by last 7 days . You can also find files that you have edited before or after accessed or modifed file .

1 ) To list the files in current Directory .

      find . -print
This will print all the files in the current directory (mentioned by . )

2 )Find command is a powerful command line tool and its armed with a variety of interesting options -name argument specifies a matching string for the filename .
3 ) If we want to match either of the multiple criteria , we can use OR option (-o)
4 )  The -path argument can be used to match the wildcards.

5 )To find all files other than some files .

6 ) while finding some files , it will list all of the files that are available in the current directory and all of its sub directory . so we can control it by using maxdepth and mindepth.

7) Finding files using their types either directory  , files , links 

8 ) Finding files using their size .
for more details and working see this video

Comments

Popular posts from this blog

What is the best way to learn Programming ?

Top 10 commands important for LINUX Newbies