Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I would like to find the command that copy my eclipse options to another workspace:


There is only one directory org.eclipse.core.runtime among many to copy into a new workspace preserving the structure .metadata/.plugins/. After copy the structure should be:


without manually create .metadata/.plugins/

[~]$ cd /home/me/myWorkspace/
[myWorkspace]$ cp -Rf .metadata/.plugins/org.eclipse.core.runtime -t /destination/path/newWorkspace/.metadata/.plugins
cp: can't create directory '/destination/path/newWorkspace/.metadata/.plugin': No such file or directory  

It doesn't work, and it could be source of error to write the path .metadata/.plugins manually. It certainly a better idea to create a complete script ?

share|improve this question
What error message did you get? – Benjamin Bannier Jul 20 '11 at 16:22
You need to create /dest/path/newWorkspace/.metadata/.plugins/ if this directory does not exist. You can't copy to a destination that does not exist, otherwise the command you entered should copy the dir to destination exactly as you want. – Nicholi Jul 20 '11 at 20:16
I can create the directory with mkdir -p /destination/pat/newWorkspace/.metadata/.plugins but it could be source of error. – chepseskaf Jul 21 '11 at 6:46
up vote 1 down vote accepted

I think you are looking for something like:

cd /home/me/myWorkspace
cp -Rf --parents .metadata/.plugins/org.eclipse.core.runtime /destination/path/newWorkspace
share|improve this answer
Thanks it does the trick (I've allowed myself to correct the command line about my problem) – chepseskaf Jul 21 '11 at 7:07

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.