Gentoo Archives: gentoo-user

From: Peter Humphrey <peter@××××××××××××××.org>
To: gentoo-user@l.g.o
Subject: [gentoo-user] [OT] Finding old files
Date: Fri, 19 Nov 2010 16:31:07
Message-Id: 201011191629.10909.peter@humphrey.ukfsn.org
1 Hello list,
2
3 Just to expose my ignorance again, would someone lift my blinkers
4 please? I'm recovering from an infection and my brain is stuck.
5
6 It's time to start pruning old stuff from the website I run, which has
7 2200 files in 200 directories.
8
9 I'm trying to find old images like this:
10 find . -iname \*.jpg -exec ls '-cdl' {} \; | cut -d \ -f 5-10
11
12 But this excludes the year (even though listing an old file manually
13 shows the year if it's over 12 months old), so I can't use that to
14 decide. If I do this:
15 find . -iname \*.jpg -exec ls '-cdl "--time-style=full-iso"' {} \; |\
16 cut -d \ -f 5-10
17 I get an error message: ls: invalid option -- ' '
18
19 Why does ls differ when executed by find from on the command line?
20
21 Is there a simple way to do this? Ideally I'd like a chronologically
22 ordered list of the files. I have noatime set in fstab, so I'll have to
23 rely on creation or modification date.
24
25 --
26 Rgds
27 Peter. Linux Counter 5290, 1994-04-23.

Replies

Subject Author
[gentoo-user] Re: [OT] Finding old files Grant Edwards <grant.b.edwards@×××××.com>
Re: [gentoo-user] [OT] Finding old files Paul Hartman <paul.hartman+gentoo@×××××.com>
Re: [gentoo-user] [OT] Finding old files Alan McKinnon <alan.mckinnon@×××××.com>