LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Mandriva
User Name
Password
Mandriva This Forum is for the discussion of Mandriva (Mandrake) Linux.

Notices

Reply
 
Search this Thread
Old 03-08-2007, 01:23 AM   #1
varun_saa
Member
 
Registered: Dec 2004
Posts: 188

Rep: Reputation: 30
which files have modified in the last few days ?


Hello,

Iam on mandriva 2006.

How to find which files have been modified
in the last few days ?

Thanks

Varun
 
Old 03-08-2007, 01:33 AM   #2
dannystaple
Member
 
Registered: Apr 2006
Location: London, Uk
Distribution: Ubuntu on Desktop
Posts: 121

Rep: Reputation: 15
Quote:
Originally Posted by varun_saa
Hello,

Iam on mandriva 2006.

How to find which files have been modified
in the last few days ?

Thanks

Varun
In a single directory, ls -rlt will do it. I normally add the -h flag too so I get human formatted file sizes.

Cheers,
Danny
 
Old 03-08-2007, 02:08 AM   #3
ygloo
Member
 
Registered: Aug 2006
Distribution: slack
Posts: 323

Rep: Reputation: 30
hello,
you could use "find"
Code:
find dir -type f -ctime number_of_days
 
Old 03-10-2007, 04:44 AM   #4
varun_saa
Member
 
Registered: Dec 2004
Posts: 188

Original Poster
Rep: Reputation: 30
Thanks that was helpful.

Varun
 
Old 03-10-2007, 06:33 AM   #5
dannystaple
Member
 
Registered: Apr 2006
Location: London, Uk
Distribution: Ubuntu on Desktop
Posts: 121

Rep: Reputation: 15
Quote:
Originally Posted by ygloo
hello,
you could use "find"
Code:
find dir -type f -ctime number_of_days
Ygloos method has the advantage (I think) that it will recurse into subdirectories, which mine wont. My version will actually list all files in a directory, but it sorts them by date and time.

Danny
 
Old 03-10-2007, 07:46 AM   #6
varun_saa
Member
 
Registered: Dec 2004
Posts: 188

Original Poster
Rep: Reputation: 30
find dir -type f -ctime number_of_days

how do you specify ' -type '

Thanks again

Varun
 
Old 03-10-2007, 10:34 AM   #7
Micro420
Senior Member
 
Registered: Aug 2003
Location: Berkeley, CA
Distribution: Mac OS X Leopard 10.6.2, Windows 2003 Server/Vista/7/XP/2000/NT/98, Ubuntux64, CentOS4.8/5.4
Posts: 2,986

Rep: Reputation: 45
-type is an option

Example using find:
Code:
find /home -type f -ctime 5 -print
Find a regular file in /home that has been changed in the past 5 days and print out the full path results

Last edited by Micro420; 03-10-2007 at 10:35 AM.
 
  


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
gnu make recompiles the source files fully even though the files are not modified yasothamani Linux - Software 4 02-07-2007 06:36 AM
how to list all files modified in last N days sneakyimp Linux - General 3 07-28-2006 12:16 PM
files modified by adduser flying-tuxman Linux - Newbie 1 01-07-2006 07:48 PM
Tar files in a dir modified before 7 days in a shell script jayachristina Linux - Newbie 4 05-14-2004 02:49 AM
How would you check which files had been modified? entm Linux - General 1 05-14-2002 09:11 AM


All times are GMT -5. The time now is 12:47 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