Bill Jonas wrote: > 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. :-) > > > > ------------------------------------------------------------------------ > > Thanks for the tips Bill! xargs wasn't in my arsenal, but it is now. -- -Eric 'shubes' "There is no such thing as the People; it is a collectivist myth. There are only individual citizens with individual wills and individual purposes." -William E. Simon (1927-2000), Secretary of the Treasury (1974-1977) "A Time For Truth" (1978), pg. 237 --------------------------------------------------- PLUG-discuss mailing list - PLUG-discuss@lists.plug.phoenix.az.us To subscribe, unsubscribe, or to change you mail settings: http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss