Issue
I saw some shell scripts that cd
into some file path that starts with an alias and have /../../ in between, for example:
$exampleroot/../../folder/subfolder/filename.zip
i understand that /../ means root path but what does this /../../ refer to? does it mean capturing all misc sub folders in between regardless of the folders name?
Thanks
Solution
..
means the parent directory, i.e. the one that contains $exampleroot
. ../../
is therefore two levels up:
$ pwd
/tmp
$ mkdir -pv foo/bar
mkdir: created directory 'foo/bar'
$ cd foo/bar/
$ pwd
/tmp/foo/bar
$ cd ../..
$ pwd
/tmp
Answered By - ndc85430 Answer Checked By - Mary Flores (WPSolving Volunteer)