Terminal Text
$ cd LALALA
~/LALALA $ dir
la\ la\ 1 la\ la\ 2
~/LALALA $
Directory Image
When I use dir
command in terminal, the list of file show \
(backslash) to separate their word (see: Terimanal Image). Whereas in the origin, there is no '\' (backslash) (see: Directory Image). How do I change this back to normal?
NB. I think the reason is because of the pwd
command on the terminal. After I use the PWD command, this happens.
Best Answer
What you experience is quoting,
dir
has the-N
or--literal
option to disable it:The exact same applies to
ls
, just that it quotes the whole filenames with single quotes instead of escaping special characters (which can be triggered with-b
or--escape
forls
as well). Callingls
with-N
disables this behaviour as well.Example run
Further reading
man dir
andinfo dir
ls
: Filenames with space showing as 'file name' after upgrade to 18.04