[CentOS] question re: ls oddity

Fri Apr 20 00:42:47 UTC 2018
Stephen John Smoogen <smooge at gmail.com>

On 19 April 2018 at 20:12, Fred Smith <fredex at fcshome.stoneham.ma.us> wrote:
> Hi all!
> I use Centos-7 all the time. I also have a Fedora-26 VM that I use only
> occasionally.
> Today I noticed that ls on the two systems gives different results when
> listing the same (networked) directory.
> the one on fedora 26 shows files with spaces in the names like this:
> whereas the one on Centos shows it without the quotes.
> both systems have the same alias for ls
> I don't see anything based on a brief excursion of the respective man pages.
> the one on Centos is version 8.22, and the one on F26 is 8.27, so unless
> there is some dotfile somewhere that ls refers to for options, this must
> be a version-change.
> it seems like a possibly useful feature, one might be able to use that
> to avoid nasty quoting problems in shellscripts, for instance.
> Anybody know how that gets enabled?

This looks like it was something changed in 8.25 with various quoting options

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

So looking at 8.22 you can get this with "ls --quoting-style=shell"
gives you 'zoo sh' versus zoo sh

> thanks!
> --
> ---- Fred Smith -- fredex at fcshome.stoneham.ma.us -----------------------------
>     "Not everyone who says to me, 'Lord, Lord,' will enter the kingdom of
>      heaven, but only he who does the will of my Father who is in heaven."
> ------------------------------ Matthew 7:21 (niv) -----------------------------
> _______________________________________________
> CentOS mailing list
> CentOS at centos.org
> https://lists.centos.org/mailman/listinfo/centos

Stephen J Smoogen.