Finding files in Linux

Suppresses the

Permission denied messages when searching your whole hard drive with “find”

nano ~/.bashrc

at the bottom paste:

function myfind() {
find $1 -name $2 2>/dev/null
}

close and reopen your Terminal.

To find a file, say MyDoc.ods, type in terminal (from anywhere)

myfind / MyDoc.ods

That searches the whole hard drive (any external/network mounted drives as well) If you only want to search under your home directory, type:

myfind ~ MyDoc.ods

Categories:

Updated:

Leave a Comment