I am writing a .sh to do some work for me, but I am now at the point where I have to cd to the directory the file /path/to/file.end is in. terminal doesn't allow
cd /path/to/file.end
bash: cd: /path/to/file.end: Not a directory
there is sadly no workaround I know of, so it would be nice if you could help!
cd /path/to
? That will change the directory to the directory that the filefile.end
is in.shopt -s autocd
(default on zsh) to your~/.bashrc
, Allows you to cd into directory merely by typing the directory name. More:man bash | grep "autocd"