LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 02-09-2009, 02:10 PM   #1
khvatov
LQ Newbie
 
Registered: Jan 2006
Location: Feasterville Trevose, PA
Distribution: Arch Linux, Slackware
Posts: 10

Rep: Reputation: 0
How do I list recently created/modified files?


Hi,
How do I list recently created/modified files?

I know : ls -FlAt | head just would sort the files in one directory, but how do I find recent files globally?

Thanks.
Alex
 
Old 02-09-2009, 02:16 PM   #2
jonmcc
LQ Newbie
 
Registered: Dec 2005
Distribution: Fedora Core 4
Posts: 7
Blog Entries: 1

Rep: Reputation: 2
Try using find, e.g..
find . -type f -mtime -20
...will find files modified within the last 20 days. Useful for housekeeping unwanted logs > certain age. You can then do something like...

find logdir1 logdir2 -type f -mtime +40 -exec rm -f {} \;
 
Old 02-09-2009, 02:35 PM   #3
khvatov
LQ Newbie
 
Registered: Jan 2006
Location: Feasterville Trevose, PA
Distribution: Arch Linux, Slackware
Posts: 10

Original Poster
Rep: Reputation: 0
That's perfect.
Thanks.
 
Old 03-08-2009, 11:12 PM   #4
palisetty_suman
Member
 
Registered: Feb 2007
Location: TX, USA
Distribution: fedora
Posts: 191

Rep: Reputation: 33
Thumbs up hi

thanks i too got that
 
  


Reply

Tags
recent


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
rsync: only backup recently modified files hamish Linux - Software 3 09-20-2011 10:55 AM
Recently created files yusufs Linux - Newbie 1 06-06-2008 11:18 AM
How to Find and remove 7 days before modified/created files neel.gurjar Linux - Software 2 05-14-2008 09:17 PM
how to list all files modified in last N days sneakyimp Linux - General 3 07-28-2006 01:16 PM
Find all files created or modified between 2 times MicahCarrick Linux - Software 3 06-29-2006 05:22 PM


All times are GMT -5. The time now is 03:16 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration