LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
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.

Notices

Reply
 
Search this Thread
Old 09-30-2005, 07:44 AM   #1
mrd
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
homey
Senior Member
 
Registered: Oct 2003
Posts: 3,057

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


Reply


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 4 10-02-2005 01:50 PM
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


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

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