Re: local updatedb files ... [Was: Finding files not present]
Rick Macdonald <email@example.com> writes:
> David B. Teague wrote:
> > > On my stand-alone machine at home, I get all files by making this change
> > > to /etc/cron.daily/find:
> > >
> > > #cd / && updatedb --localuser=nobody 2>/dev/null
> > > cd / && updatedb 2>/dev/null
> > BTW Please explain why the && is present in the script! I have never
> > understood what that is doing...
> I'm no wiz shell programmer, but the && means "and", such that the
> second command (updatedb) is _not_ executed if the first command fails.
> Likewise, there is a "||" operator. See man sh, man bash, etc.
If "cd /" is not included, then the updatedb starts from the home
directory of root, /root, which gives a very incomplete listing.