I am trying to copy the contents of a folder to another folder in a different directory using terminal.
Would somebody be able to provide me an example of the command line syntax required to achieve this?
|
I am trying to copy the contents of a folder to another folder in a different directory using terminal. Would somebody be able to provide me an example of the command line syntax required to achieve this? |
|||||
|
|
You can copy the content of a folder
The The |
|||||||||||||||||||||
|
|
An alternate is rsync
The advantages of rsync are:
|
|||||||||||||||||||||
|
|
Lets say you have a folder called folder1 in your To copy all the contents of
|
|||||||||||||||||
|
|
Check this http://www.cyberciti.biz/faq/copy-folder-linux-command-line/ for more information on copying folder. Hope this helps.
In this example copy
Where,
Copy a folder called /tmp/conf to /tmp/backup:
|
|||||||||
|
|
If there are two folders: (with write permission)
If you are inside the folder called PORTAL where you want to copy all content of another folder say DATA at the same level then you will do
You have to notice 2 dots. Last dot says copy here in present folder and one following /DATA/. says that all the CONTENTS inside DATA folder to be copied, and not the DATA folder itself. If you remove this trailing "." from /DATA/ then whole DATA folder will be copied inside PORTAL(from where you are coping). |
||||
|
|
Thank you for your interest in this question.
Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).
Would you like to answer one of these unanswered questions instead?