Mailinglist Archive: opensuse (2114 mails)

< Previous Next >
Re: [opensuse] silly girls' cli copy problem
  • From: Anders Johansson <ajohansson@xxxxxxxxxxx>
  • Date: Sat, 1 Sep 2007 11:03:08 +0200
  • Message-id: <200709011103.09012.ajohansson@xxxxxxxxxxx>
On Saturday 01 September 2007 10:13:51 Jan Engelhardt wrote:
> On Sep 1 2007 09:02, G T Smith wrote:
> >>> nonmembers folder at the command line. What do I type?
> >>
> >> rsync -AHPSXav --exclude=members * members/;
> >>
> >>> Sounds easy doesn't it.
> >>
> >> Indeed, I am not sure why everyone tries to use cp, ls, grep and
> >> pipes.
> >
> >Indeed (now rsync as well)...
> >
> >when...
> >
> >cp -dpP * members
> >
> >will actually do the required job...( I did test it after I wondered why
> >everyone was missing the obvious :-) )
>
> That certainly does not work.
>
> 10:14 ichi:../home/nonmembers > mkdir 100 200 300 400
> 10:14 ichi:../home/nonmembers > touch 100/100 200/200 300/300 400/400
> 10:14 ichi:../home/nonmembers > md members
> 10:14 ichi:../home/nonmembers > cp -Pdp * members
> /bin/cp: omitting directory `100'
> /bin/cp: omitting directory `200'
> /bin/cp: omitting directory `300'
> /bin/cp: omitting directory `400'
> /bin/cp: omitting directory `members'

shopt -s extglob
cp !(members) nonmembers/
-- 
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx

< Previous Next >
List Navigation