Chapter 5 Flashcards
The user elvis knows that he created a file called report.txt two days ago, but has forgotten where he stored it. He knows that his machine has been continuously running, so he uses the locate command to find the file, but the command returns no hits. Which of the following is the most likely reason the file could not be found by locate?
The file was created in the /tmp directory.
Which of the following commands rebuilds the locate database?
The updatedb command is being given a lower scheduling priority because it can take a long time to execute.
The user blondie just restored a large number of files from a backup tape, and would like to be able to search through her files with the locate command. How should she proceed?
As the root user, she should run the updatedb command manually.
Use the contents of the following transcript to answer the next 2 questions.
[root@station root]# cat /etc/cron.daily/tmpwatch /usr/sbin/tmpwatch 240 /tmp /usr/sbin/tmpwatch 720 /var/tmp for d in /var/{cache/man,catman}/{cat?,X11R6/cat?,local/cat?}; do if [ -d "$d" ]; then /usr/sbin/tmpwatch -f 720 $d fi done
-
About how long can a file expect to live untouched in the /tmp directory?
10 days
About how long can a file expect to live untouched in the /var/tmp directory?
1 month
In which of the following files can you customize which directories are omitted from the locate database?
/etc/updatedb.conf
What command can be used to update the locate database?
updatedb
Which file should be edited to most easily modify how often the file /var/log/cups/access_log is rotated (but only that file)?
/etc/logrotate.d/cups
Which file should be edited to most directly modify how often logs are rotated by default?
/etc/logrotate.conf