Deleting all image files with "small" keyword
Paolo Galtieri
pgaltieri at gmail.com
Sat Apr 10 21:42:21 UTC 2010
On 04/10/2010 02:28 PM, Leonard Adjei wrote:
> I've been using Fedora for a while, but I must confess that when it
> comes to shell scripting I'm found wanting many a times.
> The thing is, I have an Audio Folder which contains hundreds of track
> with Album arts. Most of the album arts are small and Big, I would
> want a script which would search my audio directory and it sub-folders
> and delete all image files with the term "small" as part of the file
> names (eg, AlbumartSmall, Folder_small etc ...)
>
One way to do it is:
find <folder name> -type f -name "*[Ss]mall*" -exec rm {} \;
this will remove all files in <folder name> that has small or Small in
the name.
Paolo
More information about the users
mailing list