Re: /tmp

Top Page
Attachments:
Message as email
+ (text/plain)
+ (application/pgp-signature)
Delete this message
Reply to this message
Author: Bill Jonas
Date:  
To: plug-discuss
Subject: Re: /tmp
On Thu, Jan 27, 2005 at 10:35:35PM -0700, Eric Shubes wrote:
> A handy little command to find all references to "tmp" in your cron
> directories is:
> find /etc/cron* -name "*" -exec grep -H tmp {} \;


To be pedantic, you can replace that with just:
grep -r tmp /etc/cron*

If you're not using GNU grep (a grep that doesn't have the -r option),
you'll probably want to use something like this instead:
find /etc/cron* -type f |xargs grep tmp /dev/null
You might need to include -print with find, depending on the OS. I
included "/dev/null" because non-GNU greps (to my knowlege) generally
don't have -H, and this ensures that there are always at least two
filenames on the command line, making grep print the filename. (See
xargs(1) for details about what it does.)

'-name "*"' is superfluous. And depending on the quoting rules of your
shell, the double-quotes will almost certainly mean that the * is
interpreted by the shell instead of being passed along to find. Use \*
or '*' instead.

> BL, it's not a good idea to put your files in /tmp. That's not what it's
> there for. /home is where the heart is. ;)


There's no place like $HOME. :-)

-- 
Bill Jonas    *        *    http://www.billjonas.com/
"It's a dangerous business, Frodo, going out your front door.  You step
into the Road,  and if you don't keep your feet,  there  is  no knowing
where you might be swept off to."  --  Bilbo Baggins