coreutils
[Top][All Lists]
Advanced

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

Re: ls is broken, what's next cd?


From: Bernhard Voelker
Subject: Re: ls is broken, what's next cd?
Date: Thu, 8 Feb 2018 00:34:23 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0

On 02/07/2018 10:12 AM, Harald Dunkel wrote:
I wonder who is supposed to benefit from this change? For a
human eye these constructs are simply unrecognizable, unless
you look*very*  closely.

There's no change for directories without special file names:

  $ \ls -log
  total 164
  drwxr-xr-x 2   4096 Feb  5 20:23 d
  drwxr-xr-x 2 155648 Jan 28 19:22 d1
  -rw-r--r-- 1      0 Feb  8 00:28 file
  drwxr-xr-x 2   4096 Jan 28 19:22 mnt

... but once you introduce such a file it will be recognized
immediately:

  $ touch 'a b'

  $ \ls -log
  total 164
  -rw-r--r-- 1      0 Feb  8 00:29 'a b'
  drwxr-xr-x 2   4096 Feb  5 20:23  d
  drwxr-xr-x 2 155648 Jan 28 19:22  d1
  -rw-r--r-- 1      0 Feb  8 00:28  file
  drwxr-xr-x 2   4096 Jan 28 19:22  mnt

This is nice IMO.
Your example was quite extreme, and therefore it's clear that
the listing would be hard to read in any style of ls output;
but: the new one can at least be used for copy/paste  ... without
any ambiguity.  Before, there was a certain chance to affect
unwanted files.

Have a nice day,
Berny



reply via email to

[Prev in Thread] Current Thread [Next in Thread]