![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | 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 here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Find Oldest file in a directory tree | rahulrathod | Shell Programming and Scripting | 24 | 06-05-2008 03:01 PM |
| Removing a file from a directory | npatel | Filesystems, Disks and Memory | 5 | 05-22-2008 07:47 AM |
| how to grep the oldest file in a directory | ericaworld | Shell Programming and Scripting | 1 | 05-29-2007 10:24 AM |
| Finding the oldest file in a particular directory | pavan_movva | Shell Programming and Scripting | 2 | 10-07-2006 02:17 AM |
| Oldest File In A Directory | bergerj3 | UNIX for Dummies Questions & Answers | 2 | 02-27-2002 11:31 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
|||
|
Removing the oldest file in a directory
Hi all,
I need your assistance in removing the oldest file in a directory. I posted the same thread 3 days back and I got the following answer Code:
ls -1 -t | tail -1 | xargs rm So, could you please provide an option so that the above command will exclude the directories in the search. Thanks in advance for your help Pavan |
| Forum Sponsor | ||
|
|