Linux Today: Linux News On Internet Time.

More on LinuxToday

Searching filesytem from command line

Feb 10, 2011, 20:32 (0 Talkback[s])

WEBINAR: On-demand webcast

How to Boost Database Development Productivity on Linux, Docker, and Kubernetes with Microsoft SQL Server 2017 REGISTER >

[ Thanks to Femi for this link. ]

"There are several commands available on the command line to locate files and folders on the file system. This article reviews three of them, viz whereis ,locate. find.

"1) whereis
This command can search for the binary, source, and manual page files for a comand

$ whereis whereis
whereis: /usr/bin/whereis /usr/share/man/man1/whereis.1.gz

"2) locate: locate uses a database created by an updatedb to efficiently locate files. Works great, assuming your database is updated often enough to be reasonable upto date. Most boxes using locate have the updatedb occuring in cron. On my ubuntu box, I got a long list of files when I tried to locate command."

Complete Story

Related Stories: