So I know the basics of relative paths in Linux...
- ./ denote path relative to current folder
- ../ denotes path relative to parental folder
but what if I want to run an executable (./exeToRun) relative to a parental folder? Do I use three dots?
Example
File stucture
project
│ README.md
│ file001.txt
│
└───folder1
│ │ exeToRun
│ │ file012.txt
│ │
│ └───subfolder1
│ │ myScript.py
│ │ file112.txt
│ │ ...
│
└───folder2
│ file021.txt
│ file022.txt
If I wanted to call ./exeToRun executable from myScript.py, relatively, I would assume the syntax would be .../folder1/exeToRun
. Two dots since it's relative to parent folder and one dot since its an executable.
Now I know this is incorrect, but I'm looking for some clarity on how to correctly achieve this functionality.