LinuxQuestions.org
Review your favorite Linux distribution.
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 11-23-2009, 08:03 AM   #1
thomas2004ch
Member
 
Registered: Aug 2009
Posts: 539

Rep: Reputation: 33
How to check which file is changed in the last few days?


Sometime I do want to know who has changed which file in the last few days.

How? I think 'history' is maybe one way. But there should be other better ways.
 
Old 11-23-2009, 08:15 AM   #2
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
Take a look at the "find" command.
example:
Code:
find . -mmin -1
finds all files in the current directory (and below) that were modified less than 1 minute ago.

"man find" for details
 
Old 11-23-2009, 08:28 AM   #3
thomas2004ch
Member
 
Registered: Aug 2009
Posts: 539

Original Poster
Rep: Reputation: 33
Quote:
Originally Posted by pixellany View Post
Take a look at the "find" command.
example:
Code:
find . -mmin -1
finds all files in the current directory (and below) that were modified less than 1 minute ago.

"man find" for details
This just find out the changed file under current dir. How about find out all the files?
 
Old 11-23-2009, 08:37 AM   #4
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,529

Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899
Quote:
This just find out the changed file under current dir. How about find out all the files?
Code:
find / -mmin -1
 
Old 11-23-2009, 12:59 PM   #5
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
Quote:
Originally Posted by thomas2004ch View Post
This just find out the changed file under current dir. How about find out all the files?
Look at the man page!!!

The full syntax is:
find [options] [path] [expression]

"." (meaning current directory) is only one example of a pathname.
 
Old 11-23-2009, 01:22 PM   #6
jijawm
LQ Newbie
 
Registered: Nov 2009
Posts: 9

Rep: Reputation: 0
If I read your question correctly, you also want to know WHO changed a file. I don't believe there is any data on the OS level that would be of much help; you should look at the application level for this kind of info.
That said:
ls -altr
shows in reverse order of data/time when the files have changed, the most recent being at the bottom of the list.
ls -altru
shows in reverse order of data/time when the files have been accessed. Very useful during upgrades for weeding out junk that is never accessed. Under Windows this information is corrupted by anti-virus scanning. Under linux this information is usually corrupted by backup software unless explicitly told to retain the last time accessed.
 
  


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
dd copy running for 4 days, can i check status somehow? rwreed Linux - Newbie 10 02-25-2009 09:27 PM
Need help with script for check for a file that has changed in the last minute EclipseAgent Programming 10 02-12-2009 07:46 PM
How to check, verify, and fix the ext3 harddrives at boot every 2 days ? frenchn00b Linux - General 4 02-13-2008 09:31 AM
/dev/sda10 has gone 49710 days without being checked,check forced! deepclutch Ubuntu 2 03-07-2007 05:43 AM
Check if user has changed PW fenriswolf Linux - Security 3 04-29-2003 09:01 PM

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

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