find only new created files from certain date => display folder and path only
Hello, I seem to be having problems constructing the correct syntax for finding only newly created files from a certain date.
The command "must" (in my ideal situation):
I only got this: find ./ -type f -mtime -4 -exec ls -al {} \; It finds newly created AND modified files up to 4 days back. I am afraid my specifications forces the the above only to be possible in a BASH script, if that is the case, a kick in the right direction would be very welcome (or dare I ask, a fully working example for me to modify to my own needs) Many thanks in advance! |
If your file system supports it, you could use something like:
Code:
find / -newerBt "2011-10-25 21:00:00" --Bryan |
Extending the above, there is NO create time in Unix
Quote:
The very informative man page for 'find' is here http://linux.die.net/man/1/find I'd prob start with a simple find cmd and append some other bash cmds if required; easier to debug than all in one line eg Code:
for file in $(find / ....) Good bash tutorials http://rute.2038bug.com/index.html.gz http://tldp.org/LDP/Bash-Beginners-G...tml/index.html http://www.tldp.org/LDP/abs/html/ Welcome to LQ :) |
Thank you Bryan and Chris,
After trying the command provided by Chris I got the following message: "This system does not provide a way to find the birth time of a file." Which led me to search on: "linux birth time of a file" => I did a google search and came back on linuxquestions :) on the following topic: http://www.linuxquestions.org/questi...-linux-473684/ After reading Bryan's comment I see the "lmitation" and I can use those provided links! Thanks! If it's alright I want to keep this topic open for a few more days and then close it, maybe someone else has some tips/work-arounds? I'll close it friday if this is ok? Thanks again! |
I'm afraid even w/ scripting you won't have much fun as Linux
doesn't know anything about creation time-stamps. If they are crucial for whatever you're doing you may want to use kernel auditing, or maybe an inotify-script to keep track of creations, and write those to an easily parseable file. Cheers, Tink |
No use to keep this open, thanks everyone for the info.
Looks like I have to take a different route. |
All times are GMT -5. The time now is 02:47 AM. |