LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (http://www.linuxquestions.org/questions/linux-general-1/)
-   -   Copying hidden files recursively? (http://www.linuxquestions.org/questions/linux-general-1/copying-hidden-files-recursively-368432/)

mrd 09-30-2005 07:44 AM

Copying hidden files recursively?
 
I need to completely copy a home directory to another home directory. There are hundreds of config files and hidden directories in it. cp -R ignores the hidden files (anything starting with .). cp -R .* doesn't work either, as it only copies things that are hidden, so you don't get, for example, a non-hidden file in a hidden directory.

I just want to copy everything as is. There must be a way to do that.

homey 09-30-2005 07:51 AM

Try this...
cp -vR /home/user1/\. /home/fred
chown -R fred:users /home/fred/*


All times are GMT -5. The time now is 09:18 AM.