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'd like to copy everything recursively from a folder but the files symlinked from an other directory, how can I achieve that?

share|improve this question
By symlinked, do you mean files which are symlinks to other files or files who are symlinked somewhere else ? – Levans Aug 7 '13 at 7:10
I updated my question, hope it's more clear now – Jonathan de M. Aug 7 '13 at 7:14

I think I found the solution

rsync -a --exclude='.*' --no-links . destfolder

I tested on my zsh and it copies everything recursively from the current folder except the symlinks and hidden files (bonus)


share|improve this answer

how about:

find ./ -maxdepth 1 -type f -exec cp {} destfolder \;


( or you meant "except files symlinked 'elsewhere' ? )

share|improve this answer
It works but it doesnt copy the symlink and the folders, I'd like to copy everything from a folder except the symlink – Jonathan de M. Aug 7 '13 at 7:05
just tryied that same command in zsh+fedora17 and it worked. Any error out the copy command / did it find any file? ( -maxdepth 1 = looking only in that dir, not in subdir ). Eventually, check found files via: find ./ -maxdepth 1 -type f -print – user1293137 Aug 7 '13 at 7:31

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.