![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Help Required: Command to find IP address and command executed of a user | loggedout | Security | 2 | 08-06-2008 05:12 PM |
| how to? launch command with string of command line options | TinCanFury | Shell Programming and Scripting | 5 | 04-28-2008 03:06 PM |
| inconsistent ls command display at the command prompt & running as a cron job | rajranibl | Linux | 5 | 07-30-2007 05:26 AM |
| How to use more than one MPE command STREAM with Unix command in a single shell? | bosskr | HP-UX | 1 | 10-16-2006 01:16 PM |
| How to use more than one MPE command STREAM with Unix command in a single shell? | bosskr | Shell Programming and Scripting | 0 | 09-19-2006 06:44 PM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
#15
|
|||
|
|||
|
Deleting Files between two date ranges
This will help you to remove all the files between the two date ranges ie ( all files between May-2-2005 & June-6-2005)
HTML Code:
find <your-dir> -name '*' \( -newer /tmp/May-2-2005 -a ! -newer /tmp/June-6-2006 \) -ok rm {} \;
Thanks Nagarajan Ganesan. |
| Forum Sponsor | ||
|
|
|
#16
|
|||
|
|||
|
Thanks ennstate for your help but I am going to go Shell Life's route!! I really appreciate your help though.
|
|
#17
|
|||
|
|||
|
i need the log files for the files which are 2 days older before deleting the files
|
|
#18
|
|||
|
|||
|
Just to be very clear i need to generate a log file in which the file name should be there before deleting the files which are two days older .. can anyone can help me on this .. Thanks in advance !!
|
|
#19
|
||||
|
||||
|
Comment the second of these two lines in the option you already chose to use.
The output file will contain the list. Code:
ls -1t | sed -n "/$$END_FILE/,/$$START_FILE/p" > $$rm_FILE sed 's/^/rm -f /' $$rm_FILE > FINAL_rm_FILE |
|
#20
|
|||
|
|||
|
i am using this command find * -type f -atime +30 -exec gunzip {} \; for unzipping the files which are 30 days older .. but how can i get the log for which files the command has unzipped ..
This should be in a single line .. Thanks!! |
|
#21
|
||||
|
||||
|
The simplest way would be to run the command twice, once without the exec, to list the files, the second with the exec to extract them.
|
||||
| Google The UNIX and Linux Forums |
| Tags |
| mtime |
| Thread Tools | |
| Display Modes | |
|
|