LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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, 10: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, 10:59 AM   #2
Germany_chris
Senior Member
 
Registered: Jun 2011
Location: NOVA
Distribution: Debian 12
Posts: 1,071

Rep: Reputation: 497Reputation: 497Reputation: 497Reputation: 497Reputation: 497
is the cp command not working?
 
Old 09-09-2014, 11:05 AM   #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



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 04:53 PM
why doesn't cp copy folders? paddy Linux - Newbie 2 03-22-2006 02:35 PM
copy files and folders codepoet Linux - Newbie 2 06-12-2005 02:08 PM
Copy folders codepoet Linux - Newbie 4 05-12-2005 01:59 AM
how to copy files/folders??? Gallienus Linux - General 4 12-15-2003 12:02 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:41 PM.

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
Open Source Consulting | Domain Registration