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

Re: A-posteriori use of another HDD for the /home/username



On Dec 28, 2009, at 5:48 AM, Andrei Popescu wrote:

> Unless I'm doing something wrong 'cp -a .*' will try to copy the parent 
> directory as well

Hmm. Bears looking into. But I swear I've been doing '.*' forever. Maybe that explains the high disk drive bills :-)

> The correct solution 
> from my tests seems to be to use '.' with either
> 
> cp -a source/. destination/

That looks like a request to copy a directory. So '.' gets invisibles? Didn't know that... 

No, wait a minute. '.' is the current dir. So 'source/.' should mean 'source/<current>'?? What shell are you using? 

... <grabs a terminal and types>

Nope. You're absolutely right. In bash, 'ls .*' does what I expected, but 'cp -a .*' does do the parent, like you said. 'cp .*' doesn't, though. It just doesn't copy invisible directories. Huge apologies -- especially to the OP. Now I wonder what it is I *have* been doing for all that cp'ing for so long...

I still don't understand how 'source/.' would work, though.

-- 
Glenn English
ghe@slsware.com




Reply to: