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 just came to an interesting question in Linux. I want to find a shortcut for copying from multiple folder back in the path to the current path. For example:

A/B/C/D/E> cp ../../../example.txt .

I want to see if there is any shortcut for the above command, instead of typing .. couple of times.

share|improve this question
A shortcut for what? For copying from exactly 3 folders above your current directory? Are you looking for something more general or you need specifically 3? – terdon Jul 24 '13 at 15:19
if there is any shortcut for the above command - No. – september Jul 25 '13 at 16:58

Bash is great... try something like this:

for dir in dir_one dir_two dir_three/path; do cp some.file $dir; done
share|improve this answer
I don't think this answers the question; That's not a shortcut for something like cp ../../../example.txt . – Darth Android Jul 24 '13 at 15:28

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.