Cp loops

for some reason, freebsd-8 netbsd-current and even on linux i believe.
the cp command loops when doing this
cp -Rvp /home/user/path/.* /home/user/path/

I do this to copy all my dotfiles.
example of what i mean by loop
cp /media/hdd/.zshrc > /home/user/.zshrc
cp /media/hdd/../hdd/.zshrc > /home/user/hdd/.zshrc

and it continues forever?
I'm sorry if this isn't clear.
 
Try using [cmd=""]cp -Rvp /home/user/path/.[^.]* /home/user/path[/cmd] to exclude .. from the glob.
 
Back
Top