Command line stuff
Dexter Filmore
Dexter.Filmore at gmx.de
Thu Jan 24 21:33:03 UTC 2008
On Wednesday 23 January 2008 20:32:58 Brad De Vries wrote:
> On Jan 23, 2008 2:04 PM, Sylviane et Perry White <spwhite at freesurf.ch>
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?
> >
> > I'm aware this thread is not really KUbuntu specific but I would be very
> > reluctant to have to adopt the "one question_one list" approach.
> >
> > Greetings Perry
>
> You could use the format:
> $ mv `ls | grep ".png" | grep -v "blob"` /the/new/directory
>
Not bad at all, I'd add -1 --color=no to ls to avoid funny effects.
--
-----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