As a side note, if you end up with a
directory with too many files in it for “ls” or “rm” to
handle, this is a handy syntax to remember. This has happened to me a few times
in the past with uploadable image directories that have gotten bigger than I
ever expected.
Example, to delete a bunch of files from such
a directory (don’t try this at home if you’re not sure of what you’re
doing!):
find
./* | xargs rm
Another trick I use to automatically
compress uploaded images (requires ImageMagick) that our field technicians
failed to use an automated program to resize / compress:
find ./ -size "+200k" | xargs
mogrify -quality 60 -geometry 600x10000
It is a very handy syntax to know and
understand.
Regards,
-Tim
From:
plug-bounces@lists.phillylinux.org [mailto:plug-bounces@lists.phillylinux.org] On Behalf Of Andrew Gwozdziewycz
Sent: Thursday, October 16, 2008
11:45 AM
To: Philadelphia Linux User's
Group Discussion List
Subject: Re: [PLUG] CLI for
"find" text string in an unknown file