I am trying to make a simple command in Linux similar to cd..
in DOS
. What I tried is to make a script that changes directory to a path, which I have to get from pwd
, by removing the last folder name.
So for a path: /home/usr/Downloads/images
I want to get /home/usr/Downloads
.