?

Log in

No account? Create an account
Ummm ... - He's just this guy, you know.

> Recent Entries
> Archive
> Friends
> Profile

Links
Schlock Mercenary
Something Positive
Megatokyo
Irregular Webcomic
Sluggy Freelance

February 20th, 2013


Previous Entry Share Next Entry
10:37 pm - Ummm ...
Recorded for ... ummm ... posterity ?
open -a /Applications/Preview.app/ $( identify $( file $( find . -type f -mtime -7h ) |
 grep image | awk -F: '{print $1}' ) | sort -k3,3n | cut -d'[' -f 1 | tail -45  )


... translation: "Open, using the Preview application, the largest (by X dimension) 45 images among those found anywhere under the current directory, among those modified in the last 7 hours".

(I'm running it from the Firefox Cache directory, ~/Library/Caches/Firefox/Profiles/profile_name/Cache)

There's probably a better way to do it ... almost certainly suitable one-liners in Perl/Ruby/Python could be found. But this worked for me :)



Original post on Dreamwidth - there are comment count unavailable comments there.
Current Mood: geekygeeky

(3 touches | En garde !)

Comments:


[User Picture]
From:morniendil
Date:February 28th, 2013 08:35 am (UTC)
(Link)
Where does the identify come from? I don't seem to have one of those on Mountain Lion.
[User Picture]
From:davidcook
Date:February 28th, 2013 12:24 pm (UTC)
(Link)
Ah, that's part of ImageMagick (which I installed with HomeBrew - "brew install imagemagick").
I use identify and mogrify quite a bit, and hardly any of the other tools ...
[User Picture]
From:morniendil
Date:March 2nd, 2013 03:30 am (UTC)
(Link)
Gotcha, thanks! Not that I'm likely to actually need the 'identify' command, but you know, general curiosity and all that!

> Go to Top
LiveJournal.com