Exploit-DB updates

Friday, June 17, 2011

Find a file and its directory in linux

Okay this is a quick tip, which a lot of you guys probably know, but I forgot about it untill just now. I always find myself in a situation where I need to find a files location but can't seem to locate it, at which point I resort to google. But a quicker and easier way to do this is the "whereis" command.

~ $ whereis conky
conky: /usr/bin/conky /etc/conky /usr/lib/conky /usr/share/man/man1/conky.1.gz

Alternatively you could use the find command.

 ~ # find / -iname conky
/etc/conky
/usr/bin/conky
/usr/share/doc/conky
/usr/lib/conky

No comments:

Post a Comment