At 08:34 -0700 13/5/04, Larry Helms wrote: >No... Executing rm * only removes the files. If you were to use rm -rf * >... THAT would remove the directory as well. > > >> From: Mark Gibson <gibsonm at bigpond.net.au> >> Date: Fri, 14 May 2004 00:26:01 +1000 >> To: Mac OS X Unix <X-Unix at lists.themacintoshguy.com> >> Cc: Larry Helms <lhelms at sonic.net> >> Subject: Re: [X-Unix] Trying to get rid of unwanted files >> >> At 07:17 -0700 13/5/04, Larry Helms wrote: >>> [cron schedule date/time stuff] cd /var/spool/cups; rm *; {other commands >>> you want to perform} >>> >>>> From: Mark Gibson <gibsonm at bigpond.net.au> >>>> Reply-To: "Mac OS X Unix" <X-Unix at lists.themacintoshguy.com> >>>> Date: Fri, 14 May 2004 00:09:24 +1000 >>>> To: "Mac OS X Unix" <X-Unix at lists.themacintoshguy.com> >>>> Subject: [X-Unix] Trying to get rid of unwanted files >>>> >>>> Hi, >>>> >>>> I'm one of many suffering from OS 10.3.3's print server bloat problem >>>> (the /var/spool/cups/tmp directory files with 1000's of files and the >>>> print service chokes and fails). >>>> >>>> I've written a cron task to clean out the /tmp folder but I'm trying >>>> to find a suitable Unix command to clean out the /cups folder, >>>> leaving the /tmp folder behind. >>>> >>>> I want to end up with two tasks, one that cleans /tmp (deletes the >>>> contents) and one that removes everything from /cups except the /tmp >>>> directory. >>>> >>>> Can anyone point this GUI user in the right direction (please keep >>>> it simple)? >>>> -- >>>> Regards, >>>> >>>> Mark (}-: >>>> >>>> AIM / iChat: gibsonm1 >>>> >>>> "I'd rather have a frontal lobotomy than Windoze in front of me..." >>>> -- Brian J. Lowry >> >> Yes, >> >> But wont that remove /tmp as well? >> >> /tmp is in /cups (i.e. /var/spool/cups/tmp). I need something that >> removes the files but leaves the structure intact. >> >> Happy to be corrected BTW. >> -- >> Regards, >> >> Mark (}-: >> >> AIM / iChat: gibsonm1 >> >> Fleschely janglers, opyn preisers and blamers of hemself or of any >> other, tithing tellers, rouners and tutilers of tales, and alle maner >> of pinchers, kept I never that thei sawe this book -- C.O.U >> >> Larry, OK. I'll give rm -f * a go (as I don't want to confirm each deletion). My concern is that there seems to be an upper limit to the number of files that rm can cope with. Hopefully running this script daily will keep the number of files in /cups beneath that. I know I have to use a different approach in /tmp because the files there can reach several thousands in a 24 hr period. Thanks. Al - I know how it feels, it was 0100 when I was posting and its now 0630 (thankfully its Friday!). -- Regards, Mark (}-: AIM / iChat: gibsonm1 Most of the people I know use Macs, and it feels like we're a privileged minority, though the odd thing is that, unlike Mercedes' or BMWs, they are not significantly more expensive than the competition. Why does anybody use anything else? -Douglas Adams