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 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 me

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 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 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

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: create file

2004-01-02 Thread Norman Zhang
t;; open(IN, $a) || die "cannot open $a for reading: $!"; open(OUT, ">$b") || die "cannot open $b for reading: $!"; while () { print scalar reverse OUT $_; } close (IN) || die "cannot close $a: $!"; close (OUT) || die "cannot close $b: $!"; but no myou

Re: create file

2004-01-02 Thread Norman Zhang
May I ask how could I list a file contents backward in a new file? What is your definition of backwards? I want to list each character of the file backwards. e.g., File_A hello. how are you? File_B ?uoy era woh .olleh perl -le 'print reverse <>' some-file-you-want-reversed perl -le 'print reve

Re: create file

2004-01-02 Thread Norman Zhang
>> May I ask how could I list a file contents backward in a new file? > > > What is your definition of backwards? I want to list each character of the file backwards. e.g., File_A hello. how are you? File_B ?uoy era woh .olleh > perl -le 'print reverse <>' some-file-you-want-reversed > > perl -

create file

2004-01-02 Thread Norman Zhang
Hi, May I ask how could I list a file contents backward in a new file? Regards, Norman -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]