[95153] in RedHat Linux List
Question about scripts
daemon@ATHENA.MIT.EDU (zappa@inetnow.net)
Thu Oct 15 14:50:17 1998
From: zappa@inetnow.net
Date: Thu, 15 Oct 1998 14:31:04 -0400 (EDT)
To: Redhat ML <redhat-list@redhat.com>
Resent-From: redhat-list@redhat.com
Reply-To: redhat-list@redhat.com
Hi all,
I wrote a bash script to run as a cron job which removes those pesky files
emacs leaves behind. Here is my script:
#!/bin/bash
PATH=/bin:/usr/bin
find / \( -name a.out -o -name core -o -name '*~' \
-o -name '.*~' -o -name '#*#' \) -type f -atime +10 \
-exec rm { } \; -o -fstype nfs -prune -o -path /mnt/win95c -prune \
-o -path /mnt/win95d -prune -o -path /mnt/win95e -prune
exit 0
If I run this find command at a bash shell prompt everything works fine
but if I place it in a script I get errors about can't find whatever file.
If I replace -exec with -ok rm prompts me to remove the correct files but I
still get an error after it tries to remove each file. Any ideas?
Thanks,
-Mandarth
CS major at "Southern Polytechnic State University" and Linux enthusiast
Member of the Tenchi Ring, #ASOL#, and #WASHU#
Site Administrator of:
Ryoko's Hot Spring http://www.inetnow.net/~zappa/index.html
--
PLEASE read the Red Hat FAQ, Tips, Errata and the MAILING LIST ARCHIVES!
http://www.redhat.com http://archive.redhat.com
To unsubscribe: mail redhat-list-request@redhat.com with
"unsubscribe" as the Subject.