LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-09-2014, 11:44 AM   #1
pacolotero
LQ Newbie
 
Registered: Sep 2013
Posts: 4

Rep: Reputation: Disabled
Copy folders


I have this directory structure

/home/user/.maildir
/home/user2/.maildir
.
.
.
/home/usern/.maildir

I would like copy only the user folder and his .maildir to /home/backup with his result: (the users have other files in his home but only want copy .maildir)

/home/backup/user/.maildir
/home/backup/user2/.maildir
.
.
.
/home/backup/usern/.maildir
 
Old 09-09-2014, 11:59 AM   #2
Germany_chris
Senior Member
 
Registered: Jun 2011
Location: Stuttgart, Germany
Distribution: Arch
Posts: 1,021

Rep: Reputation: 479Reputation: 479Reputation: 479Reputation: 479Reputation: 479
is the cp command not working?
 
Old 09-09-2014, 12:05 PM   #3
pacolotero
LQ Newbie
 
Registered: Sep 2013
Posts: 4

Original Poster
Rep: Reputation: Disabled
I try with this but not work
find -name '*maildir*' -exec cp -r {} /home/backup/{} \;
 
  


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Copy all files except from some certain folders. eikhorsholm Linux - Newbie 2 01-19-2010 05:53 PM
why doesn't cp copy folders? paddy Linux - Newbie 2 03-22-2006 03:35 PM
copy files and folders codepoet Linux - Newbie 2 06-12-2005 03:08 PM
Copy folders codepoet Linux - Newbie 4 05-12-2005 02:59 AM
how to copy files/folders??? Gallienus Linux - General 4 12-15-2003 01:02 PM


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

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration