list of files changed from certain date

Alicelinux

New Member
Joined
Sep 23, 2018
Messages
23
Reaction score
0
Credits
0
I'm using red hat linux, is it able to get the list of changed files and newly created files under /etc folder from Aug.21.2018 untill now. I'm fine if two command, one for created files and the other for changed files. any idea? thanks
 


There could be a command for that exact purpose but I know none. You could try, and this is kinda overboard I know, "dry run" something like touch and to see differences in dates by piping the result of the command into a txt... Damn, that's too much, there is probably someone who can actually help :p
 
See my reply to you here. The find command will work better on this instead of deleted files. I doubt you can list deleted files, but I'm not certain.
 
find command can't list newly created files, but changed files can, so how to find newly created files (say the last ten days)
 
What about this?:
Code:
find -daystart /path/to/search -type f -ctime -10

That should find ALL files that were created or modified in the last 10 days.
 
What about this?:
Code:
find -daystart /path/to/search -type f -ctime -10

That should find ALL files that were created or modified in the last 10 days.
I get an error with the "-daystart" option, but without that it seems to work properly for me. :D

Cheers
 
In that case the -daystart option may have been removed from find. I have to admit, I haven't used -daystart with find for a long time, I just know of it's existence (or former existence).
I'm at work ATM and not anywhere near a Linux terminal...

The -daystart option would set the start time for the search to the start of the day for the first day of the search.
So if it's 3pm and you are searching for files that were modified in the last 10 days without the -daystart option - then find would only include files from 10 days ago time-stamped from 3pm onwards. Whereas with the -daystart option, find would show files from the start of the day from 10 days ago onwards, so you were guaranteed to get ALL files from the first day.

Incidentally, the reason I've used a negative value (-10) with -ctime is to get ALL files that were created/modified in the last 10 days.
If I used a positive value (e.g. 10, or +10) with -ctime, it would only show files that were created EXACTLY 10 days ago.
 


Top