Wednesday, August 1, 2012

Find files and folders within Linux via terminal session

Several options are available within Linux to find files or folders.  The locate command is different than the find command in that it uses a previously built database.  The database is updated periodically via a cron job, but it can be updated manually by the sudo updatedb command.

linux_find_1

linux_find_2

The –b option allows search criteria to be specified.

linux_find_3

The which command returns the absolute path of the executable that is called when a command is issued.  The default only displays the first matching executable; the –a option all matching entries.

linux_find_4

The whereis command returns where the binary, source, and man page files for a command are located.

linux_find_5

https://www.networkworld.com/article/3657592/using-whereis-whatis-and-which-to-find-out-about-commands-on-linux.html

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.