-   Linux - Newbie (
-   -   What's the difference between 'updatedb' and 'updatedb&' ?? (

DreameR-X 12-18-2004 01:40 PM

What's the difference between 'updatedb' and 'updatedb&' ??
Just curious. I notice that updatedb won't make a new bash line until it's done...while updatedb& puts [1] *some #* and then immediately makes a new bash; yet it is obviously still updating. And when you hit enter on the new bash (after the cpu stops wizzing), it puts [1]+ Done updatedb. But what does it all mean???!! :D Thanks!

bigrigdriver 12-18-2004 01:43 PM

Updatedb runs in foreground. Add & to the command (as in updatedb &) and it runs in background, and gives you the term window back for other uses. It also gives you the job number assigned to the background process, in case you need to kill it for some reason.
PS to see what processes are running in background, use the jobs command (a bash builtin command).

DreameR-X 12-18-2004 02:45 PM

Then another question: if I install programs and stuff while updatedb is running; is updatedb pointless? (since it won't include the new stuff?) Point being, what's the point in having it in the background while I program something...when I save the program, that program won't be in the db...right?

P.S. Can I use & for most any commands?

slakmagik 12-18-2004 03:17 PM

Updatedb is often run from a cron job. Thus it may always be a little out of date, but no more than a few hours. Hopefully you won't lose stuff you've just put on the system. :) If you need an up to the minute snapshot, just run it manually.

Yeah - any command can be backgrounded, or most any.

DreameR-X 12-18-2004 04:36 PM

Awesome, thanks for all of the advice!

All times are GMT -5. The time now is 08:06 PM.