terminal cd command
if your file name has a gap like "File 1" when u try to go to this directory by cd File 1. it shows an error (cd: string not in pwd:)
MacBook Air 13″, macOS 12.2
if your file name has a gap like "File 1" when u try to go to this directory by cd File 1. it shows an error (cd: string not in pwd:)
MacBook Air 13″, macOS 12.2
In zsh and bash shells, vertical (not angled) double quotes are required around strings containing embedded spaces.
hhttps://unix.stackexchange.com/questions/131766/why-does-my-shell-script-choke
etc
In zsh and bash shells, vertical (not angled) double quotes are required around strings containing embedded spaces.
hhttps://unix.stackexchange.com/questions/131766/why-does-my-shell-script-choke
etc
Put its name in quote marks or a backslash before the space.
(243076)
In the Terminal, when you want to change directory to a folder whose name contains white-space, you can do the following path completion if you don't want to manually escape the space. You replace the angle-bracket tab notation with a single tab key press, and the next line is what the shell updates on the same line. Then press return and you enter that space punctuated folder.
cd File<tab>
cd File\ 1/
The Finder is happy with any character except ':' and in the Terminal where UNIX lives, there are certain characters (including white-space) that must be escaped from the shell.
There are times spaces are disallowed. This may be one of them.
terminal cd command