[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: General method for copying a partition



On Wednesday 17 February 2010 13:40:20 Stephen Powell wrote:
> On Wed, 17 Feb 2010 12:26:43 -0500 (EST), Boyd Stephen Smith Jr. wrote:
> > Use this instead:
> > cp -a /media/. /mnt
> > OR
> > cp -a /media/{.[!.],}* /mnt
> 
> Your second method doesn't work in ash because ash does not support
> brace expansion.

Sorry, I sometimes forget that brace expansion isn't part of the standard 
Shell Command Language.

You could write them out separately:
cp -a /media/.[!.]* /media/* /mnt
BUT
That could still fail depending on how your shell treats patterns that do not 
match any existing pathnames (standard behavior is to leave the pattern 
string, but both bash and zsh have options of different behavior) and how your 
cp utility handles source_file arguments that do not exist.
-- 
Boyd Stephen Smith Jr.           	 ,= ,-_-. =.
bss@iguanasuicide.net            	((_/)o o(\_))
ICQ: 514984 YM/AIM: DaTwinkDaddy 	 `-'(. .)`-'
http://iguanasuicide.net/        	     \_/

Attachment: signature.asc
Description: This is a digitally signed message part.


Reply to: