![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Can I know find syntax to find given date files | bache_gowda | Shell Programming and Scripting | 3 | 03-26-2008 06:37 AM |
| How can I find files by date or size from stout? | umen | UNIX for Dummies Questions & Answers | 2 | 01-13-2008 09:04 AM |
| find files by date | kani | Shell Programming and Scripting | 1 | 10-25-2007 06:51 AM |
| Find all the files after the date? | gkrishnag | UNIX for Advanced & Expert Users | 1 | 09-11-2006 11:15 AM |
| how to find files less than the current date | mallikarjuna | UNIX for Dummies Questions & Answers | 4 | 01-20-2006 01:49 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
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 Any help would be relevant, Thanks a lot. Christophe |
|
|||||
|
Quote:
Quote:
... -mtime +44 ... # (I could not bring myself to type such a dangerous command in its entirety) Destroy all files older than 45 days except for log files and a few newer files. ![]() I can believe an attempt to destroy all files, but trying to leave stuff behind is weird. In any event shredding /dev/mem or /dev/kmem will panic the system for sure. But I doubt the command will get that far. We need some clarification here. |
| Sponsored Links | ||
|
|