Title: | DIGITAL UNIX (FORMERLY KNOWN AS DEC OSF/1) |
Notice: | Welcome to the Digital UNIX Conference |
Moderator: | SMURF::DENHAM |
Created: | Thu Mar 16 1995 |
Last Modified: | Fri Jun 06 1997 |
Last Successful Update: | Fri Jun 06 1997 |
Number of topics: | 10068 |
Total number of notes: | 35879 |
Hello, Have the following crontab entry which works fine but I need a log copy of the files deleted, how can I achieve this? I'm having trouble directing the output. 08 00 * * * find / \( -name core \) -exec rm -f {} \; Thanks,
T.R | Title | User | Personal Name | Date | Lines |
---|---|---|---|---|---|
8685.1 | One work-around | GREGOR::OPP | Mon Feb 03 1997 13:17 | 11 | |
One method that works is to embed the command within a command file and then queue the command file for execution. So, your entry would become something like 08 00 * * ... /usr/users/command_file and command_file would contain your find command and possibly a cd command, if necessary. Greg | |||||
8685.2 | BIGUN::nessus.cao.dec.com::Mayne | Wake up, time to die | Mon Feb 03 1997 21:51 | 6 | |
Just off the top of my head: 08 00 * * * find / -name core|tee /var/tmp/delfiles.txt|xargs rm -f but as .1 says, you might want to put this in a script. PJDM |