OT - Command line stuff

Dexter Filmore Dexter.Filmore at gmx.de
Thu Jan 24 21:28:33 UTC 2008


On Wednesday 23 January 2008 20:04:51 Sylviane et Perry White wrote:
> On Wednesday 23 January 2008 15:57, Donn wrote:
> > You are in a dir in a console. You have a few consoles (or tabs) open
> > around the place.  You want to move some files to another dir. You want
> > *.jpg but not "blob.jpg". You also want a few pdfs, but not all of them.
>
> (snip)
> This may not help you but is an introduction to my own question.
> I tried something like :
> ls | grep .jpg | grep -v blob
> That seemed to work
> (I tried "ls | grep .png | grep -v snap | grep -v ban" to remove all
> snapshot?.png and banner?.png from one of my dirs)
>
> The problem is I didn't find a method to interface that with mw or cp.
> Any tips?

Pipe the output into xargs or spare the grp stunt and use find with -a and -o 
and -not switches plus -exec.
One could script this, I guess.

Dex




-- 
-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GCS d--(+)@ s-:+ a- C++++ UL++ P+>++ L+++>++++ E-- W++ N o? K-
w--(---) !O M+ V- PS+ PE Y++ PGP t++(---)@ 5 X+(++) R+(++) tv--(+)@ 
b++(+++) DI+++ D- G++ e* h>++ r* y?
------END GEEK CODE BLOCK------

http://www.vorratsdatenspeicherung.de




More information about the kubuntu-users mailing list