P. 1
Linux Certification Bible

Linux Certification Bible


|Views: 2.327|Likes:
Publicado porMarcelo

More info:

Published by: Marcelo on Dec 18, 2008
Direitos Autorais:Attribution Non-commercial


Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less





If you are having difficulty finding a particular log or configuration file, you can use
one of two commands for help. The locatecommand finds the location of any file
that you are looking for. Simply enter a search string, and the locatecommand
queries an internal database that stores the location of all the commands.

234881-6 ch16.F 11/12/01 8:31 AM Page 493

494Part VI ✦Troubleshooting and Maintaining System Hardware

For example, if you need to find the location of your resolv.conffile, simply enter
the following command:

locate resolv.conf

The following is the output of the command:


If you don’t know the name of the file, you can type a certain amount of characters,
and locate it will match all files with that string of characters. Using this function-
ality, however, may bring up a large number of matches that you will have to search

The database of files is updated routinely by a system cronjob. You can also
update the database manually by using the command updatedb.

Another command that you can utilize for file searching is find. The findcom-
mand searches the specified directory for the file that you are looking for. This com-
mand is helpful if you already know the general directory. For example, you may be
looking for a configuration file that you know resides in the /etc directory, but you
aren’t sure of the subdirectory. You can use the following command:

find /etc -name “httpd.conf”

This command provides the following output:


Know how to use the various command line tools to help you navigate your log
and configuration files more efficiently.

You're Reading a Free Preview

/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->