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

Suppose this is a part of my directory structure in Unix. Is there any difference between these two:


base/setup$ myfile


base/install$ ../setup/myfile

I was trying to install something, and the second gave me some library dependency errors. I thought that these two methods are the same. Why is not that so?

share|improve this question
The best way to realise this, I think, is to write full paths: base/setup/ > base/setup/myfile base/install/ > base/setup/myfile – netme Jul 30 '10 at 9:46
@netme: here ">" is not the redirection operator, I meant "base/setup>" as a command prompt. – Lazer Jul 30 '10 at 10:33
It would be better to include error messages or specific unexpected behavior in your question. "Did not work" provides no useful information. You may prefer ">" in your prompt, but when you show it to other people change it to "$" in order to reduce confusion. – Dennis Williamson Jul 30 '10 at 14:17
"Did not work"? Which means what exactly? – Lawrence Velázquez Jul 30 '10 at 16:08
@Lawrence Velázquez: got some library dependency errors. – Lazer Jul 30 '10 at 19:13
up vote 6 down vote accepted

base/setup/myfile and base/install/../setup/myfile are the same file. The only explanation I can think of is that base/setup/myfile is referencing a file with a path relative to your current working directory (e.g: run ./modules/pre-setup) - in which case it may make a difference where you are when you run the script.

share|improve this answer

it may not have worked as myfile could be trying to call or use things in current directory expecting to be located in the base/setup directory but you are in the base/install directory.

share|improve this answer

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.