Relative path help

i am in a sub directory called "Run" and above it is "Pro" and above pro is "mid" i have some files in a folder called "D4" and above that is a next folder called "D2" which is a sub to "mid" how could i use relative to copy a file from "D4" if am in "run"

i tried to use cp run/pro/mid/D2/D4/filename and nothing happens?? help please
. = current directory
.. = parent directory

so what you would want to run (assuming you are in run):
cp ../../D2/D4/the_file ./the_file
no that didnt work this is the absolute way i did cp from that folder cp ~/mid/d2/d4/file .

so its like this, the file is inside "D4" and am in "run" and want to use relative to copy from D4 to my current directory


..........................................................mid............................................................
............................................D2.........................pro.............................................
..........................D4.........................................................Run..............................

Last edited on
Is this what it looks like?
1
2
3
4
5
6
- mid
  - pro
    - run (ā†current directory)
  - D2
    - D4
      * the_file

And you want to copy the_file into run?

If so, what was given to you looks like what you want.
cp ../../D2/D4/the_file .
thanks that work without

how can i list all files in the bin that consist of 2 characters where the first is range from a to d
Last edited on
Topic archived. No new replies allowed.