Folder Clean-up

2004-03-15 Thread Norman Zhang
Hi, I've /share_folder with many user folders. e.g., /share_folder/user_a /share_folder/user_b ... I would like to scan all user folders for files that are older than 30 days and delete them. Is this doable with Perl? Regards, Norman -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional

RE: Folder Clean-up

2004-03-15 Thread Wagner, David --- Senior Programmer Analyst --- WGO
Norman Zhang wrote: > Hi, > > I've /share_folder with many user folders. > > e.g., > > /share_folder/user_a > /share_folder/user_b > ... > > I would like to scan all user folders for files that are older than 30 > days and delete them. Is this doable with Perl? Use File:Find and you can

Re: Folder Clean-up

2004-03-15 Thread Randy W. Sims
On 03/15/04 13:52, Norman Zhang wrote: Hi, I've /share_folder with many user folders. e.g., /share_folder/user_a /share_folder/user_b ... I would like to scan all user folders for files that are older than 30 days and delete them. Is this doable with Perl? What do you mean by "older than 30 day

Re: Folder Clean-up

2004-03-15 Thread u235sentinel
I know this doesn't fully answer you question but I'm wondering, do you mean files that your users haven't accessed in 30 days? What if they are using it like once a week? I'm reading through the "Learning Perl 3rd Edition" and on page 159 there are a number of file tests available. If your u

RE: Folder Clean-up

2004-03-15 Thread Wagner, David --- Senior Programmer Analyst --- WGO
Norman Zhang wrote: >>> I've /share_folder with many user folders. >>> >>> e.g., >>> >>> /share_folder/user_a >>> /share_folder/user_b >>> ... >>> >>> I would like to scan all user folders for files that are older than >>> 30 days and delete them. Is this doable with Perl? >> >> Use File:F

RE: Folder Clean-up

2004-03-15 Thread u235sentinel
Not the prettiest way but here is how I check if File::Find is installed: perldoc -X File::Find Like I said, it's not pretty. I figure there wouldn't be a doc on the machine if the module wasn't there. Bad presumtion I know. Still, maybe someone can help educate us. I'm a sorta perl-newbi

Re: Folder Clean-up

2004-03-15 Thread Norman Zhang
I've /share_folder with many user folders. e.g., /share_folder/user_a /share_folder/user_b ... I would like to scan all user folders for files that are older than 30 days and delete them. Is this doable with Perl? Use File:Find and you can do all that you need to accomplish. See the doc. Wags

Re: Folder Clean-up

2004-03-15 Thread Norman Zhang
I've /share_folder with many user folders. e.g., /share_folder/user_a /share_folder/user_b ... I would like to scan all user folders for files that are older than 30 days and delete them. Is this doable with Perl? What do you mean by "older than 30 days"? I mean files that were created 30 days a

Re: Folder Clean-up

2004-03-15 Thread Randy W. Sims
On 03/15/04 14:24, Norman Zhang wrote: I've /share_folder with many user folders. e.g., /share_folder/user_a /share_folder/user_b ... I would like to scan all user folders for files that are older than 30 days and delete them. Is this doable with Perl? What do you mean by "older than 30 days"?

Re: Folder Clean-up

2004-03-15 Thread Radhika Sambamurti
On Mon, 15 Mar 2004 14:11:44 -0500 "Randy W. Sims" <[EMAIL PROTECTED]> wrote: > You can use the perl utility 'find2perl' to generate the code for you: > > find2perl /share_folder -atime +30 > rmoldshares.pl This is great! I am a newbie... and i tried using the find2perl utility, and viola! it do

Re: Folder Clean-up

2004-03-15 Thread Wiggins d Anconia
> On Mon, 15 Mar 2004 14:11:44 -0500 > "Randy W. Sims" <[EMAIL PROTECTED]> wrote: > > > You can use the perl utility 'find2perl' to generate the code for you: > > > > find2perl /share_folder -atime +30 > rmoldshares.pl > > This is great! I am a newbie... and i tried using the find2perl utility,

Re: Folder Clean-up

2004-03-15 Thread Radhika Sambamurti
On Mon, 15 Mar 2004 13:47:09 -0700 "Wiggins d Anconia" <[EMAIL PROTECTED]> wrote: > > Boy that must have been "music" to your ears ;-) those gude spelers in > the croud will get mi meaning Ah, of course!!! sarcasm. I get it. So all we need now is a spell checker parser program, which Im

Re: Folder Clean-up

2004-03-15 Thread John W. Krahn
Norman Zhang wrote: > > Hi, Hello, > I've /share_folder with many user folders. > > e.g., > > /share_folder/user_a > /share_folder/user_b > ... > > I would like to scan all user folders for files that are older than 30 > days and delete them. Is this doable with Perl? Something like this (un

RE: Folder Clean-up

2004-03-15 Thread Wiggins d Anconia
Please bottom post > Not the prettiest way but here is how I check if File::Find is installed: > > perldoc -X File::Find > > > Like I said, it's not pretty. I figure there wouldn't be a doc on the machine if the module wasn't there. Bad presumtion I know. Still, maybe someone can help e

Re: Folder Clean-up

2004-03-15 Thread Randy W. Sims
On 03/15/04 15:00, Wiggins d Anconia wrote: Not necessarily true. perldoc expects POD, which can be internal or external to a particular module's source code, it is possible to remove the documentation and still have the module installed. Slightly better would be to just invoke the perl interprete

Re: Folder Clean-up

2004-03-15 Thread Randy W. Sims
On 03/15/04 17:34, Norman Zhang wrote: Randy W. Sims wrote: Is there a specific reason you're using perl for this task? You can accomplish the same with: find /share_folder -mtime +30 | xargs rm but you should probably verify the correctness of the command first with find /share_folder -mtime +

Re: Folder Clean-up

2004-03-15 Thread Wiggins d'Anconia
Randy W. Sims wrote: On 03/15/04 15:00, Wiggins d Anconia wrote: Not necessarily true. perldoc expects POD, which can be internal or external to a particular module's source code, it is possible to remove the documentation and still have the module installed. Slightly better would be to just invo

Re: Folder Clean-up

2004-03-15 Thread Norman Zhang
Is there a specific reason you're using perl for this task? You can accomplish the same with: find /share_folder -mtime +30 | xargs rm but you should probably verify the correctness of the command first with find /share_folder -mtime +30 | xargs ls Thank you so much. Your simple script does pre

Re: Folder Clean-up

2004-03-15 Thread Randy W. Sims
On 03/15/04 20:22, Norman Zhang wrote: I generated the script with "find2perl testfl/ -mtime +30 > rmoldshares.pl", but it seems File::Find doesn't recognize foldernames with spaces. 8( Anyone know other solutions beside using manual opendir, readdir, closedir? Here is a routine I wrote a while b

Re: Folder Clean-up

2004-03-16 Thread Norman Zhang
Randy W. Sims wrote: On 03/15/04 14:24, Norman Zhang wrote: I've /share_folder with many user folders. e.g., /share_folder/user_a /share_folder/user_b ... I would like to scan all user folders for files that are older than 30 days and delete them. Is this doable with Perl? What do you mean by "o

Re: Folder Clean-up

2004-03-16 Thread Norman Zhang
Hi, Randy W. Sims wrote: Here is a routine I wrote a while back originally for scanning plugins. I've pruned it down (It could probably be much simpler as this routine does a breadth first scan which requires more bookkeeping, but I'm too lazy to fix it...), and it appears to work with director

Re: Folder Clean-up

2004-03-16 Thread Norman Zhang
Hi, Randy W. Sims wrote: Here is a routine I wrote a while back originally for scanning plugins. I've pruned it down (It could probably be much simpler as this routine does a breadth first scan which requires more bookkeeping, but I'm too lazy to fix it...), and it appears to work with director

RE: Folder Clean-up

2004-03-16 Thread Wagner, David --- Senior Programmer Analyst --- WGO
Norman Zhang wrote: > Hi, > > Randy W. Sims wrote: >> Here is a routine I wrote a while back originally for scanning >> plugins. I've pruned it down (It could probably be much simpler as >> this routine does a breadth first scan which requires more >> bookkeeping, but I'm too lazy to fix it...), a

Re: Folder Clean-up

2004-03-17 Thread Randal L. Schwartz
> "Norman" == Norman Zhang <[EMAIL PROTECTED]> writes: Norman> Hi, Norman> I've /share_folder with many user folders. Norman> e.g., Norman> /share_folder/user_a Norman> /share_folder/user_b Norman> ... Norman> I would like to scan all user folders for files that are older than 30 Norman> da