Finding a File
|Unix Command ||Meaning
|ls file1 ||by listing the directory you think it is in
|ls */file1 ||by listing all sub-directories of current directory
or by using the find command:
If you do not type the -print switch, find will say nothing, even if it finds the file you are looking for.
The find command searches for file names.
The grep command searches for strings within files.
? is the wildcard substitute for any single character in a file name
* is the wildcard representing a string of characters of any length
|ls ??||lists all files with two-character names
|ls c*||lists all files whose names begin with c
|rm f*ed||deletes all files whose names begin with f and end with ed
© 1998 Robert John Morton