-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 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' > > > > Jan
I missed the folders part in OP which was why I was a bit puzzled by the complexity of some of responses.. but cp -a [!m]* members;cp -dpP m* members will work if members is the only directory with an m at the beginning, in the copied tree. Another posters suggestion of mv members .members; cp -a * .members; mv .members members is definitely neater if this is not the case... :-) and almost certainly deals with the possibility that there is another members subfolder or file in the copied tree... which I am not entirely certain your option will handle... All the other alternatives offered worked with the standard cli tools.. IMHO This is one of the few occasions where a GUI or CUI such as mc or YTREE is more effective than than the CLI - -- ============================================================================== I have always wished that my computer would be as easy to use as my telephone. My wish has come true. I no longer know how to use my telephone. Bjarne Stroustrup ============================================================================== -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org iD8DBQFG2TS4asN0sSnLmgIRApOhAKDoMP/EkOKBIQQYFALSjpqJYwk6yQCgrIta eBHF2jG2R47dM76PnMNYEEg= =vIxz -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
