The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 06-13-2005
cbismuth cbismuth is offline
Registered User
  
 

Join Date: Jun 2005
Location: Paris, France
Posts: 1
BASH : Find files by date and shred them

Good afternoon everyone,

For security reasons, I need to delete files on a HDD I have to send after the ending of a demo.
I need to find all the files which not end by ".log" and which have been created for 45 days.
After getting the file list, I would like to use the shred command.

It would be like this :

Code:
$ find / -regex '^.*(!(\.log))$' -ctime 45 | xargs shred -fuvz

But this command line does not work.

Any help would be relevant,
Thanks a lot.

Christophe