On Sat, Apr 10, 2010 at 09:28:04PM +0000, 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 ...) Depending upon your exact needs, something like this might do it: cd <your folder> find . -maxdepth 1 -name \*Small\* exec rm -i {} \; if that complains about "command too long" or similar, try this: find . -maxdepth 1 -name \*Small\* -print | xargs rm -i this will search only the current directory, not any subdirectories. if you want to search subdirectories too, remove the "-maxdepth 1". -- ---- Fred Smith -- fredex@xxxxxxxxxxxxxxxxxxxxxx ---------------------------- Do you not know? Have you not heard? The LORD is the everlasting God, the Creator of the ends of the earth. He will not grow tired or weary, and his understanding no one can fathom. ----------------------------- Isaiah 40:28 (niv) ----------------------------- -- users mailing list users@xxxxxxxxxxxxxxxxxxxxxxx To unsubscribe or change subscription options: https://admin.fedoraproject.org/mailman/listinfo/users Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines