Bug 1349701 - Disable quoting file name behavior of ls command in coreutils-8.25
Summary: Disable quoting file name behavior of ls command in coreutils-8.25
Alias: None
Product: Fedora
Classification: Fedora
Component: coreutils
Version: 24
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
Assignee: Kamil Dudka
QA Contact: Fedora Extras Quality Assurance
: 1352691 1361694 (view as bug list)
Depends On:
TreeView+ depends on / blocked
Reported: 2016-06-24 04:09 UTC by LiuYan
Modified: 2016-08-01 07:31 UTC (History)
9 users (show)

Clone Of:
Last Closed: 2016-06-24 08:52:40 UTC

Attachments (Terms of Use)

Description LiuYan 2016-06-24 04:09:56 UTC
Description of problem:
  `ls` command now quote file name if there're spaces or special characters (such as single quote)

  # ls /hdd/VirtualBox\ VMs -d
  '/hdd/VirtualBox VMs'

Version-Release number of selected component (if applicable):
  8.25-5.fc24 (perhaps started from 8.25)

How reproducible:

Steps to Reproduce:
  1. ls a file/directory name with whitespaces or single quotes

Actual results:
  File name with whitespaces are quoted with single quote

Expected results:
  Output the original file name without quoting

Additional info:
  I found a QA thread: http://unix.stackexchange.com/questions/258679/why-is-ls-suddenly-wrapping-items-with-spaces-in-single-quotes
  As L Spice commented in the above QA thread, `export QUOTING_STYLE=literal` should do the trick

  Some useful links:

Comment 1 Kamil Dudka 2016-06-24 08:52:40 UTC
The behavior was intentionally changed by upstream.  The change in behavior is properly documented in /usr/share/doc/coreutils-common/NEWS:

  ls now quotes file names unambiguously and appropriate for use in a shell,
  when outputting to a terminal.

If you think the change was a bad idea, please explain your reasoning at the bug-coreutils mailing list.  In any case, we are not going to diverge from upstream in the default behavior of ls.

Comment 2 Pádraig Brady 2016-07-04 20:21:22 UTC
*** Bug 1352691 has been marked as a duplicate of this bug. ***

Comment 3 Kamil Dudka 2016-07-29 20:54:22 UTC
*** Bug 1361694 has been marked as a duplicate of this bug. ***

Note You need to log in before you can comment on or make changes to this bug.