Re: question re: ls oddity

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On 19 April 2018 at 20:12, Fred Smith <fredex@xxxxxxxxxxxxxxxxxxxxxx> 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:
>
> 'CHURCH FAMILY ADDRESS AND PHONE LIST.doc'
>
> 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
https://savannah.gnu.org/forum/forum.php?forum_id=8445

===
  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@xxxxxxxxxxxxxxxxxxxxxx -----------------------------
>     "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@xxxxxxxxxx
> https://lists.centos.org/mailman/listinfo/centos



-- 
Stephen J Smoogen.
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
https://lists.centos.org/mailman/listinfo/centos



[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]


  Powered by Linux