🔍 See Original Answer on Ask Ubuntu 🔗
Filenames with space showing as 'file name' after upgrade to 18.04
December 31, 2018
Edited: December 31, 2018
November 24, 2022
Copy to clipboard: false
ls behavior change was from 2016 but is finally making it’s way into Ubuntu.
To get back the old behavior use
Optionally you can use an environmental variable:
Make it an alias, or set
export QUOTING_STYLE=literal in your
~/.bashrc to achieve the old behavior.
You can read the link above for more details including the history of when, where, why and how this all came to be. There are quite a few comments under the author of ls changes where he justifies the new behavior:
A few points about the change.
- It was introduced in coreutils v8.25, and alignment improved in v8.26
- It only happens when outputting to terminals so doesn’t break scripts
- It disambiguates the output for users for files containing whitespace
- It sanitizes output so it is safe to copy and paste
- Output is now always valid to copy and paste back to shell
- Users can get back to the old format by adding