LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
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



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

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:41 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration