How can I find a file with a specific name in bash. I want to search through the whole system. I tried with find, but that only work through one level.
find by default traverses all available levels:
sudo find / -mount -name 'myfilename'
If you have a separate home partition, or a encrypted home, or a secondary hard drive, you may want to list their mount points too, next to
/, for example
sudo find / /home/enzotib /media/data -mount -name 'myfilename'
-mount option is needed to avoid to traverse mounted filesystems. Among these there are
/sys, that is convenient to skip.
An alternative to traverse all files, avoiding only these last three paths is
sudo find /!(proc|sys|dev) -name 'myfilename'