Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I want to get list of created files and folders after certain date in whole server, is it possible and how can i do?

share|improve this question

2 Answers 2

You can't find files based on creation time, but you can find it based on change time, by using find

find / -ctime -2

will list all files and folders changed 2 days or less ago

share|improve this answer
    
ctime does not necessarily reflect creation time. For example: linuxpoison.blogspot.com.ar/2008/03/ctime-atime-and-mtime.html –  cjc Jan 9 '13 at 15:21
    
I saved the answer too quickly, and went back to edit it while you posted your comment.. –  Jenny D Jan 9 '13 at 15:22
    
I tested this command and listed large quantity of files i think all isnt created in 2 days. –  WishtobeNothing Jan 9 '13 at 15:29
    
The server only gives you change time, not create time. This is the best that can be done. If you really need a log of change dates, you will need to build a list of what files are there at a given time and then check against it yourself. –  Jenny D Jan 9 '13 at 15:32
    
Thank you very much –  WishtobeNothing Jan 9 '13 at 16:32

Linux does not store the file/folder creation date. Have a look at this page. You can see the following timestamp kept in inode and retrieved using stat system call.

st_atime 
    Time of last access
st_mtime 
    Time of last modification
st_ctime 
    Time of last status change
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.