1 |
On 2010-11-19, Alan McKinnon <alan.mckinnon@×××××.com> wrote: |
2 |
> Apparently, though unproven, at 19:18 on Friday 19 November 2010, Peter |
3 |
> Humphrey did opine thusly: |
4 |
> |
5 |
>> On Friday 19 November 2010 16:40:37 Grant Edwards wrote: |
6 |
>> > On 2010-11-19, Peter Humphrey <peter@××××××××××××××.org> wrote: |
7 |
>> > > Hello list, |
8 |
>> > > |
9 |
>> > > Just to expose my ignorance again, would someone lift my blinkers |
10 |
>> > > please? I'm recovering from an infection and my brain is stuck. |
11 |
>> > > |
12 |
>> > > It's time to start pruning old stuff from the website I run, which |
13 |
>> > > has 2200 files in 200 directories. |
14 |
>> > > |
15 |
>> > > I'm trying to find old images like this: |
16 |
>> > > find . -iname \*.jpg -exec ls '-cdl' {} \; | cut -d \ -f 5-10 |
17 |
>> > |
18 |
>> > It's obvious how that command finds old images. Can you explain what |
19 |
>> > it's supposed to do? |
20 |
>> |
21 |
>> The cut command simply strips off the permissions, owner, group and file |
22 |
>> size. |
23 |
>> |
24 |
>> Never mind, anyway. I've done it by using separate steps instead of |
25 |
>> trying to combine them. I'm still puzzled though at the different |
26 |
>> behaviour of ls between command-line and execution by find. |
27 |
> |
28 |
> ls as you are using it is an option to find (not an app or a shell |
29 |
> builtin). So you need to do |
30 |
|
31 |
No, in his case "ls" it's an app that's executed by the "find" command by |
32 |
as part of the handling of the find command's "-exec" clause. |
33 |
|
34 |
-- |
35 |
Grant Edwards grant.b.edwards Yow! LOOK!! Sullen |
36 |
at American teens wearing |
37 |
gmail.com MADRAS shorts and "Flock of |
38 |
Seagulls" HAIRCUTS! |