LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 07-15-2003, 08:47 AM   #1
evione
LQ Newbie
 
Registered: Jun 2003
Location: UK
Posts: 1

Rep: Reputation: 0
Remove files by time stamp


Hi,

I would like to know if it is possible to use the rm command to remove files judging by the time they were created.

Hope someone can help me.

Many thanks
Evione
 
Old 07-15-2003, 09:35 AM   #2
bentz
Member
 
Registered: Mar 2003
Distribution: Fedora, Mac OSX
Posts: 362

Rep: Reputation: 30
You can do this, but there are several different ways depending on the timestamp criteria you are concerned with. For example, find has several different ways to compare whether or not a file has been modified in 'n' minutes or whether a file has been modified since another file. Using 'date', 'ls', and 'awk' you can use just about any date criteria to conditionally rm certain files. If you want to rotate logs, use the logrotate.d service, which is cron based.

Can you give a specific example of what timestamp criteria you are looking to examine?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Time stamp Kalyani1 Linux - Software 0 11-07-2005 02:58 PM
set up the Time stamp Kalyani1 Linux - Software 3 11-06-2005 02:36 PM
time stamp for file modification youngstorm Linux - Newbie 2 11-01-2005 03:46 PM
e-mail with time stamp from the future slackist General 1 01-15-2005 10:58 PM
Time stamp in Samba is 11 hours behind time stamp in Linux Linh Linux - General 3 09-04-2003 12:44 PM


All times are GMT -5. The time now is 05:33 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration