258 Managing Files and Directories
Tip: cron is a daemon. Daemons handle tasks in the background. To read the cron
man page, type man cron at the shell prompt.
So what happens if we:
Have more than one operating system on our machine, and switch between them – causing us
to halt and restart our Red Hat Linux system;
Shutdown and turn off our machine at the end of the day.
This might mean that cron never has a chance to update the locate database. No problem. We can
just update the database manually. Let’sgiveitatry.
First, su to root.
Now, at the shell prompt, type:
/etc/cron.daily/updatedb.cron
After a few minutes, the locate database will be current.
17.3 Command History and Tab Completion
It doesn’t take long before the thought of typing the same command over and over becomes unap-
pealing, at best.
Linux users don’t feel any differently about that, either. But in Linux, since you can string together
commands at the shell prompt, one minor typo in a couple lines of a command could mean that all
that typing was in vain.
So there’sasolution:It’s called command-line history. By scrolling with the up and down arrow keys,
we can find plenty of our previously typed commands – including the ones with typos.
Let’s try it by taking a look again at sneakers.txt.Thefirst time, however, at the shell prompt,
we’ll type:
cat sneakrs.txt
Oops! Nothing happens, of course, because there is no sneakrs.txt file.Noproblem.We’ll just
use the up-arrow key to bring back the command, then use the left-arrow key to get to the point
where we missed the “e.” Insert the letter and press
Enter again.
Comments to this Manuals