So in the dizzyingly complex Linux systems I tend to work with (my Desktop being one of the worst), I've found locate to be my goto tool for locating anything and everything that's listed as a file. Locate is great, works blazingly fast, doesn't encounter permission denied errors like find. The only issue I've encountered with locate is that it uses an index database of the local file system to search for your pattern string. This database needs to be updated prior to searches, in some shared environments this update is controlled by a cron run, but if you have sudo rights or are the root user then you can run the "locate -u" command which is often aliased as "updatedb".
user@hp-laptop:~$ locate tcpdump.
/usr/share/man/man8/tcpdump.8.gz
/var/lib/dpkg/info/tcpdump.conffiles
/var/lib/dpkg/info/tcpdump.list
/var/lib/dpkg/info/tcpdump.md5sums
/var/lib/dpkg/info/tcpdump.postinst
/var/lib/dpkg/info/tcpdump.postrm
user@hp-laptop:~$
Ever type a command and get an error like this?
john@ubuntu:/etc$ mv hosts.tar.gz bosts.tar.gz; tar -xvvzf bosts.tar.gz; ls -l | wc -l
mv: cannot move `hosts' to `bosts': Permission denied
Instead of retyping the code with a "sudo" command in front, just type:
john@ubuntu:/etc$ sudo !!
The double bang argument makes sudo run the last command as if sudo had been invoked first.
A collection of Bourne Again SHell tips and tricks.