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 ?

  • What error message did you get? Jul 20, 2011 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, 2011 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, 2011 at 6:46

1 Answer 1


I think you are looking for something like:

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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