After a upgrade to 18.04, from 16.04, all file names with spaces shows as 'file name'
. Previously it was simply file name
. File names without space shows up normally:
$ ls
bar 'foo bar'
While it doesn't affect functionality in any way, I find this visually cluttering.
I use bash
as shell.
How can I remove ''
showing around file names with spaces?
This
ls
behavior change was from 2016 but is finally making it's way into Ubuntu.To get back the old behavior use
ls -N
.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:
It's
ls
that is quoting the output, run:to get the output without any quoting.
Alias it if you want: