The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM


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 !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Compare date from db2 table to yesterday's Unix system date sasaliasim Shell Programming and Scripting 9 3 Days Ago 08:37 PM
Traversing thru dirs and deleting files based on date ravi2082 Shell Programming and Scripting 5 07-18-2007 01:28 PM
deleting files on particular date jazz High Level Programming 1 11-24-2005 08:45 AM
problem deleting date-time stamped file in a directory dharmesht High Level Programming 1 05-13-2004 06:31 AM
Deleting files older than a given date rajugp1 Shell Programming and Scripting 3 12-09-2002 11:08 AM

Closed Thread
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 11-07-2000
Registered User
 

Join Date: Nov 2000
Location: Mainland USA/Philippines
Posts: 8
Question

Hello,Is there anybody here who can teach me how to delete unix files by date?
Forum Sponsor
  #2  
Old 11-07-2000
PxT's Avatar
PxT PxT is offline
Registered User
 

Join Date: Oct 2000
Location: Sacramento, CA
Posts: 909
You can use 'ls -l' to view the date on your files, then use the 'rm' command to remove any that you like. You could also use find, maybe something like:

find . -mtime +5 -exec rm {} \;


which would erase any files not modified within the last 5 days. Check the find man page for more info.
  #3  
Old 11-08-2000
Registered User
 

Join Date: Nov 2000
Location: Mainland USA/Philippines
Posts: 8
Smile thanks PxT

Many thanks to you PxT.
Google The UNIX and Linux Forums
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 09:33 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0