Search Files in Linux (console based)

It is the mose recurring task in any Operating system , to locate files

as far linux is more over Console based rather a GUI here i am describing cosole based search.

mainly two type of search commands are there

  1. locate
  2. find
former one is based on a prepared database of files with in the system which have to be updated periodically for accureate results

before using locate for the first time you must use updatedb for initialize the search DB

now syntax

locate passwd

FIND

unlike locate find is making a real time search from the File structure, and so forth accuracy is high and speed is bit low

for seaching with name

find /etc -name samba

for search based on permission

find /etc/ -perm 755

Search for a file . 10MB

find /etc/ -size  +10M

search for a file less than 10M

find /etc -size -10M

search for a file excactly as 10.5 MB

find /etc -size 10.5M


  • Meet Author

    S.Abhilash, started this blog in the later half of 2009 as a self hosting site for all his previous blogging attempts. , My way of writing and frequency of publishing may not be uniform as my resources are my projects nd issues i came across. For the last few years this blog is reacing 100 s of unique visitors each day, thanks wordpress and google for such a perfection in their software and services.

    Head to Authors Page | Abhilash on Facebook



Category Linux, Linux Shell     Tags , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,

Comment on Facebook

Comments are closed.

Community



FREE News Letter

Enter your email address

See Also

Resources

Please Submit your Email Address to Get Latest Technology News As it Happens


Enter your email address


Read previous post:
MSSQL Server Rules Simplified

One of the most exciting RDBMS Feature RULE is very simple with MSSQL Server Creates an object called a rule....

Close