Deleting all image files with "small" keyword
Paolo Galtieri
pgaltieri at gmail.com
Sat Apr 10 22:57:29 UTC 2010
You can use
find . -type f -name "*.[sS]mall*" | egrep "\.jpg|\.png|\.bmp" >/tmp/L
while read line
do
rm $line
done < /tmp/L
/tmp/L contains a list of files that match the regular expression in the
egrep command. You can then read the file line by line and remove the
files.
Paolo
On Sat, Apr 10, 2010 at 2:46 PM, Leonard Adjei <kinkelson at gmail.com> wrote:
> > find <folder name> -type f -name "*[Ss]mall*" -exec rm {} \;
>
> This would delete all Files with Small or small in the filenames.
> I want to delete image files [png,jpg,bmp] only not music files with
> small in their names too
>
> Thanks
> --
> users mailing list
> users at lists.fedoraproject.org
> To unsubscribe or change subscription options:
> https://admin.fedoraproject.org/mailman/listinfo/users
> Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.fedoraproject.org/pipermail/users/attachments/20100410/42573084/attachment.html
More information about the users
mailing list