Finding packages
207
Searching the file system
When you work on a program source tree, or even just a collection of doc
uments, the editor you use may well make a backup copy of the file, so you
can recover to the last good version if the changes turn out to be really bad.
When you are finished with all the edits, it is useful to be able to remove all
those backup files. For instance joe adds the character to the end of the file
name, so the command:
rm `find ./ name ``* ''`
will search all of the directories in the current path for file with a name that
ends in and provide those names as a list of files for the rm command. This
is a very useful method of using one command to produce output that is acted
upon by another command. In this case the accent character (`) is used to
bracket the find command, causing it to be executed, with the output from
the find command being used as the argument list for the rm command. Thus,
each file found to end with the character is removed by the rm command.
A simpler use of the find command is to locate a configuration file on the
system. Thus, the command:
find printcap
will list:
/etc/printcap
as the location for that file. If you forgot where you saved that important file,
find will save the day. For more information on the find command, or any of
the other commands discussed above, see your friendly man and info pages.
With a little investigation you can learn all about the capabilities of your new
Debian GNU/Linux system.
footer
Our partners:
PHP: Hypertext Preprocessor Best Web Hosting
Java Web Hosting
Inexpensive Web Hosting
Jsp Web Hosting
Cheapest Web Hosting
Jsp Hosting
Cheap Hosting
Visionwebhosting.net Business web hosting division of Web
Design Plus. All rights reserved