Re: Deleting all image files with small keyword

2010-04-11 Thread Cameron Simpson
On 11Apr2010 07:54, Joachim Backes joachim.bac...@rhrk.uni-kl.de wrote: | On 04/11/2010 01:04 AM, Leonard Adjei wrote: | using | sudo find AUDIO/ -name \*Small\*.jpg -exec rm {} \; | worked fine for me. | | Thanks | | this will run the rm command separately for *each found* small.jpg file. |

Deleting all image files with small keyword

2010-04-10 Thread Leonard Adjei
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

Re: Deleting all image files with small keyword

2010-04-10 Thread Paolo Galtieri
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

Re: Deleting all image files with small keyword

2010-04-10 Thread Leonard Adjei
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@lists.fedoraproject.org To unsubscribe or

Re: Deleting all image files with small keyword

2010-04-10 Thread fred smith
On Sat, Apr 10, 2010 at 09:28:04PM +, 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

Re: Deleting all image files with small keyword

2010-04-10 Thread Leonard Adjei
What I'm worried about is it deleting filenames (music) which has the word small in them. Or that is unlikely?? --- $ find AUDIO/ -name \*Small\* exec rm -i {} \; find: paths must precede expression: exec Usage: find [-H] [-L] [-P] [-Olevel] [-D help|tree|search|stat|rates|opt|exec]

Re: Deleting all image files with small keyword

2010-04-10 Thread Paolo Galtieri
On 04/10/2010 03:10 PM, Leonard Adjei wrote: What I'm worried about is it deleting filenames (music) which has the word small in them. Or that is unlikely?? --- $ find AUDIO/ -name \*Small\* exec rm -i {} \; find: paths must precede expression: exec Usage: find [-H] [-L] [-P]

Re: Deleting all image files with small keyword

2010-04-10 Thread Paolo Galtieri
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,

Re: Deleting all image files with small keyword

2010-04-10 Thread Leonard Adjei
using sudo find AUDIO/ -name \*Small\*.jpg -exec rm {} \; worked fine for me. Thanks -- users mailing list users@lists.fedoraproject.org To unsubscribe or change subscription options: https://admin.fedoraproject.org/mailman/listinfo/users Guidelines:

Re: Deleting all image files with small keyword

2010-04-10 Thread Joachim Backes
On 04/11/2010 01:04 AM, Leonard Adjei wrote: using sudo find AUDIO/ -name \*Small\*.jpg -exec rm {} \; worked fine for me. Thanks Hi, this will run the rm command separately for *each found* small.jpg file. Probably faster: find AUDIO/ -name \*Small\*.jpg|xargs rm This starts rm only