• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Unix command

neilm

Golden Member
Hi,

I'm looking a command to get files of a certain date. I was going to use ls -l | grep "Feb 23", but that wouldn't work when files are exactly a year old (Feb 23 2006) - it would still pick them up.

Does anyone have a good alternative?
 
Originally posted by: n0cmonkey
The find command should work.

How? Can you give me an example because I doubt -mtime or -ctime will work since they find files on age, not a certain date i.e. using find . -ctime +24 will give me files today plus files yesterday (if you understand what I'm saying).
 
Originally posted by: n0cmonkey
Solaris: Don't use the +.
+n more than n
n exactly n
-n less than n

EDIT: I don't have AIX. 🙁

I suppose I can still try the find, go in tomorrow and check if the +/- ranges are allowed... can't see why not. Thanks. If there is a more elegant approach, someone can always chime in 🙂
 
No, doesn't work for the reason that when you do mtime, it will find results from that point entering the command, to the same 24hrs ago, or whatever the argument is. It will not give me a "all day" results, i.e. yesterday, the find mtime will give me bits inbetween.
 
But find only spits out the filename, not including the date. I have found a solution so it is okay, thanks anyway.
 
Back
Top