How do I find all the files that were create only today and not in 24 hour period in unix/linux
You can't. @Alnitak's answer is the best you can do, and will give you all the new files in the time period it's checking for, but -ctime
actually checks the modification time of the file's inode (file descriptor), and so will also catch any older files (for example) renamed in the last day.
I use this with some frequency:
$ ls -altrh --time-style=+%D | grep $(date +%D)
Use ls or find to have all the files that were created today.
Using ls : ls -ltr | grep "$(date '+%b %e')"
Using find : cd $YOUR_DIRECTORY
; find . -ls 2>/dev/null| grep "$(date '+%b %e')"
This worked for me. Lists the files created on May 30 in the current directory.
ls -lt | grep 'May 30'
You can use find
and ls
to accomplish with this:
find . -type f -exec ls -l {} \; | egrep "Aug 26";
It will find all files in this directory, display useful informations (-l
) and filter the lines with some date you want... It may be a little bit slow, but still useful in some cases.