Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.


  Search this Thread
Old 09-30-2005, 07:44 AM   #1
LQ Newbie
Registered: Apr 2004
Posts: 21

Rep: Reputation: 15
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.
Old 09-30-2005, 07:51 AM   #2
Senior Member
Registered: Oct 2003
Posts: 3,057

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


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Recursively move files michaelsanford Linux - General 5 02-17-2016 01:24 AM
how to rm backup files recursively wazoo Linux - Newbie 6 12-31-2004 10:03 AM
Recursively listing files over FTP? overbored Linux - Software 4 10-14-2004 12:12 PM
copying hidden files Frustin Linux - General 19 08-27-2004 09:14 PM
Copying Hidden Directories Guru3 Linux - General 1 12-05-2003 12:59 PM > Forums > Linux Forums > Linux - General

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

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration