This is a discussion on scripting within the Shell scripting forums, part of the Development/Scripting category; how to find a file that may be situated anywhere on the system and then delete it if its older ...
|
|||||||
| Register | FAQ | Members List | Calendar | Forgotten your password? | Mark Forums Read |
| Sponsored Links | ||
|
|
|
||||
|
Hmm...
try something like this: To list file 5 days ago (modified less than then 5 days ago ) Code:
find /home -type f -mtime -5 -exec ls -lh {} \;
Code:
find /home -type f -mtime -5 -exec rm -rf {} \;
__________________
Rocky Jr. You may have my body & soul, but you will never touch my pride! If you have knowledge, let others light their candles at it. Certified to work on HP-UX / Sun Solaris / RedHat |
![]() |
| Bookmarks |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) |
|
| Thread Tools | |
| Display Modes | |
|
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| perl scripting | pansarevai | Coding in General | 2 | 03-17-2008 06:34 PM |
| new to scripting | poone1 | Shell scripting | 0 | 01-15-2008 02:19 AM |
| need help on shell scripting | rahul_sayz | Shell scripting | 1 | 12-08-2007 11:37 AM |
| new scripting problem, cat | foreach | cybergurra | Shell scripting | 5 | 03-16-2007 08:00 PM |
| Learning Shell Scripting | ricc | Shell scripting | 4 | 08-30-2005 10:37 AM |