Filenames with space showing as 'file name' after upgrade to 18.04
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?
command-line 18.04 ls
|
show 1 more comment
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?
command-line 18.04 ls
4
Why do you want to remove them, they are not part of the filename and might help you managing filenames with spaces on command line or in scripts.
– Soren A
Dec 31 '18 at 16:10
2
I'm aware they are not part of the file name. But they are visual clutter, and I don't need them.
– vidarlo
Dec 31 '18 at 16:19
4
@SorenA If you usels
to manage files in your scripts you’re doing it wrong. Why you shouldn't parse the output ofls
and Why not parsels
(and what do to instead)?
– dessert
Dec 31 '18 at 16:32
2
@WinEunuuchs2Unix It makes pasting easier, but as your answer mentions, it doesn't change behaviour when not outputting to terminal...
– vidarlo
Jan 1 at 14:14
2
@vidarlo Thels
author is at least addressing some of the issues. Knowing the author is actively involved in Stack Exchange (the link in my answer) one could more easily suggest future improvements. Then comment upvotes from other users would encourage author to implement suggestions.
– WinEunuuchs2Unix
Jan 1 at 14:28
|
show 1 more comment
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?
command-line 18.04 ls
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?
command-line 18.04 ls
command-line 18.04 ls
edited Dec 31 '18 at 16:11
wjandrea
8,47842259
8,47842259
asked Dec 31 '18 at 16:06
vidarlovidarlo
9,39842445
9,39842445
4
Why do you want to remove them, they are not part of the filename and might help you managing filenames with spaces on command line or in scripts.
– Soren A
Dec 31 '18 at 16:10
2
I'm aware they are not part of the file name. But they are visual clutter, and I don't need them.
– vidarlo
Dec 31 '18 at 16:19
4
@SorenA If you usels
to manage files in your scripts you’re doing it wrong. Why you shouldn't parse the output ofls
and Why not parsels
(and what do to instead)?
– dessert
Dec 31 '18 at 16:32
2
@WinEunuuchs2Unix It makes pasting easier, but as your answer mentions, it doesn't change behaviour when not outputting to terminal...
– vidarlo
Jan 1 at 14:14
2
@vidarlo Thels
author is at least addressing some of the issues. Knowing the author is actively involved in Stack Exchange (the link in my answer) one could more easily suggest future improvements. Then comment upvotes from other users would encourage author to implement suggestions.
– WinEunuuchs2Unix
Jan 1 at 14:28
|
show 1 more comment
4
Why do you want to remove them, they are not part of the filename and might help you managing filenames with spaces on command line or in scripts.
– Soren A
Dec 31 '18 at 16:10
2
I'm aware they are not part of the file name. But they are visual clutter, and I don't need them.
– vidarlo
Dec 31 '18 at 16:19
4
@SorenA If you usels
to manage files in your scripts you’re doing it wrong. Why you shouldn't parse the output ofls
and Why not parsels
(and what do to instead)?
– dessert
Dec 31 '18 at 16:32
2
@WinEunuuchs2Unix It makes pasting easier, but as your answer mentions, it doesn't change behaviour when not outputting to terminal...
– vidarlo
Jan 1 at 14:14
2
@vidarlo Thels
author is at least addressing some of the issues. Knowing the author is actively involved in Stack Exchange (the link in my answer) one could more easily suggest future improvements. Then comment upvotes from other users would encourage author to implement suggestions.
– WinEunuuchs2Unix
Jan 1 at 14:28
4
4
Why do you want to remove them, they are not part of the filename and might help you managing filenames with spaces on command line or in scripts.
– Soren A
Dec 31 '18 at 16:10
Why do you want to remove them, they are not part of the filename and might help you managing filenames with spaces on command line or in scripts.
– Soren A
Dec 31 '18 at 16:10
2
2
I'm aware they are not part of the file name. But they are visual clutter, and I don't need them.
– vidarlo
Dec 31 '18 at 16:19
I'm aware they are not part of the file name. But they are visual clutter, and I don't need them.
– vidarlo
Dec 31 '18 at 16:19
4
4
@SorenA If you use
ls
to manage files in your scripts you’re doing it wrong. Why you shouldn't parse the output of ls
and Why not parse ls
(and what do to instead)?– dessert
Dec 31 '18 at 16:32
@SorenA If you use
ls
to manage files in your scripts you’re doing it wrong. Why you shouldn't parse the output of ls
and Why not parse ls
(and what do to instead)?– dessert
Dec 31 '18 at 16:32
2
2
@WinEunuuchs2Unix It makes pasting easier, but as your answer mentions, it doesn't change behaviour when not outputting to terminal...
– vidarlo
Jan 1 at 14:14
@WinEunuuchs2Unix It makes pasting easier, but as your answer mentions, it doesn't change behaviour when not outputting to terminal...
– vidarlo
Jan 1 at 14:14
2
2
@vidarlo The
ls
author is at least addressing some of the issues. Knowing the author is actively involved in Stack Exchange (the link in my answer) one could more easily suggest future improvements. Then comment upvotes from other users would encourage author to implement suggestions.– WinEunuuchs2Unix
Jan 1 at 14:28
@vidarlo The
ls
author is at least addressing some of the issues. Knowing the author is actively involved in Stack Exchange (the link in my answer) one could more easily suggest future improvements. Then comment upvotes from other users would encourage author to implement suggestions.– WinEunuuchs2Unix
Jan 1 at 14:28
|
show 1 more comment
2 Answers
2
active
oldest
votes
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:
QUOTING_STYLE=literal ls
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
-N
to theirls
alias
add a comment |
It's ls
that is quoting the output, run:
ls -N
to get the output without any quoting.
man ls
-N, --literal
print entry names without quoting
Alias it if you want:
echo "alias ls='ls -N'" >> .bashrc
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1105867%2ffilenames-with-space-showing-as-file-name-after-upgrade-to-18-04%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
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:
QUOTING_STYLE=literal ls
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
-N
to theirls
alias
add a comment |
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:
QUOTING_STYLE=literal ls
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
-N
to theirls
alias
add a comment |
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:
QUOTING_STYLE=literal ls
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
-N
to theirls
alias
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:
QUOTING_STYLE=literal ls
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
-N
to theirls
alias
edited Dec 31 '18 at 16:28
answered Dec 31 '18 at 16:16
WinEunuuchs2UnixWinEunuuchs2Unix
44.5k1079169
44.5k1079169
add a comment |
add a comment |
It's ls
that is quoting the output, run:
ls -N
to get the output without any quoting.
man ls
-N, --literal
print entry names without quoting
Alias it if you want:
echo "alias ls='ls -N'" >> .bashrc
add a comment |
It's ls
that is quoting the output, run:
ls -N
to get the output without any quoting.
man ls
-N, --literal
print entry names without quoting
Alias it if you want:
echo "alias ls='ls -N'" >> .bashrc
add a comment |
It's ls
that is quoting the output, run:
ls -N
to get the output without any quoting.
man ls
-N, --literal
print entry names without quoting
Alias it if you want:
echo "alias ls='ls -N'" >> .bashrc
It's ls
that is quoting the output, run:
ls -N
to get the output without any quoting.
man ls
-N, --literal
print entry names without quoting
Alias it if you want:
echo "alias ls='ls -N'" >> .bashrc
answered Dec 31 '18 at 16:14
RavexinaRavexina
31.6k1482111
31.6k1482111
add a comment |
add a comment |
Thanks for contributing an answer to Ask Ubuntu!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1105867%2ffilenames-with-space-showing-as-file-name-after-upgrade-to-18-04%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
4
Why do you want to remove them, they are not part of the filename and might help you managing filenames with spaces on command line or in scripts.
– Soren A
Dec 31 '18 at 16:10
2
I'm aware they are not part of the file name. But they are visual clutter, and I don't need them.
– vidarlo
Dec 31 '18 at 16:19
4
@SorenA If you use
ls
to manage files in your scripts you’re doing it wrong. Why you shouldn't parse the output ofls
and Why not parsels
(and what do to instead)?– dessert
Dec 31 '18 at 16:32
2
@WinEunuuchs2Unix It makes pasting easier, but as your answer mentions, it doesn't change behaviour when not outputting to terminal...
– vidarlo
Jan 1 at 14:14
2
@vidarlo The
ls
author is at least addressing some of the issues. Knowing the author is actively involved in Stack Exchange (the link in my answer) one could more easily suggest future improvements. Then comment upvotes from other users would encourage author to implement suggestions.– WinEunuuchs2Unix
Jan 1 at 14:28