Skip to main content

8.3) Searching


Let’s pretend it is missing and you don’t know where it is and it needs to be found. You would find the file by typing:
find . –name ‘sound.dat’ –print
Don’t forget the ‘.’ or the command will not work properly.  Also, make sure you put spaces around the '.' and between -name and 'sound.dat' and -print.    The find is the Unix command and the –name and –print are parts of the command. The ‘.’ after the find means start looking for the file in the current directory and the find command will also search all directories below the current directory in the directory tree. The ‘sound.dat’ specifies the name of the file to look for. It should be in single quotes.
The ‘..’ refers to the directory above you and the ‘.’ refers to the directory that you are currently in.
The results of the find command are shown on the next page.