find a file on entire drive question
I know this is simple but I cannot find out how to issue a command (like 'whereis' or 'find') to look for a file on my entire hard drive. I have backtrack installed on /dev/sda6 and I was looking for a couple files (like 'bashrc') but I cannot figure out what should be added to force linux to look through all of the sub-directories. Can anyone help?
|
Code:
find / -name filename 2>/dev/null The 2>/dev/null command is only really necessary if you execute the command as a non-root user (otherwise the results will be drowned in "Permission denied" error messages). 2 is the "file descriptor" for the standard error stream, and the > redirects the error messages to /dev/null (otherwise known as the bit bucket. Oh, and bashrc is normally .bashrc (the leading dot indicates a hidden file). Hope this helps, Rob. |
Thanks for the help. That worked flawlessly.
|
You might find this useful.
I have no idea why it is hidden under Security. Note that the find command can be used like this on a filesystem - on a multi-partitioned disk, searching the "entire disk" becomes a little more problematic. |
All times are GMT -5. The time now is 10:35 AM. |