Apparently, though unproven, at 18:29 on Friday 19 November 2010, Peter Humphrey did opine thusly:
> Hello list, > > Just to expose my ignorance again, would someone lift my blinkers > please? I'm recovering from an infection and my brain is stuck. > > It's time to start pruning old stuff from the website I run, which has > 2200 files in 200 directories. > > I'm trying to find old images like this: > find . -iname \*.jpg -exec ls '-cdl' {} \; | cut -d \ -f 5-10 > > But this excludes the year (even though listing an old file manually > shows the year if it's over 12 months old), so I can't use that to > decide. If I do this: > find . -iname \*.jpg -exec ls '-cdl "--time-style=full-iso"' {} \; |\ > cut -d \ -f 5-10 > I get an error message: ls: invalid option -- ' ' > > Why does ls differ when executed by find from on the command line? > > Is there a simple way to do this? Ideally I'd like a chronologically > ordered list of the files. I have noatime set in fstab, so I'll have to > rely on creation or modification date. There's no such thing as file creation time on Unix - that has never been recorded. ctime is the time the *inode* was last changed mtime is the time the *file contents* was changed Having said that it seems to me you want the -mtime option to find, followed by -ls to display everything in detail. -- alan dot mckinnon at gmail dot com