GNU bug report logs - #46060
Offer ls --limit=...

Previous Next

Package: coreutils;

Reported by: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>

Date: Sat, 23 Jan 2021 23:59:01 UTC

Severity: normal

Done: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>
Subject: bug#46060: closed (Re: bug#46060: Offer ls --limit=...)
Date: Mon, 25 Jan 2021 06:49:02 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#46060: Offer ls --limit=...

which was filed against the coreutils package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 46060 <at> debbugs.gnu.org.

-- 
46060: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=46060
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>
To: Paul Eggert <eggert <at> cs.ucla.edu>
Cc: 46060-done <at> debbugs.gnu.org
Subject: Re: bug#46060: Offer ls --limit=...
Date: Mon, 25 Jan 2021 14:48:13 +0800
>>>>> "PE" == Paul Eggert <eggert <at> cs.ucla.edu> writes:
PE> That argument would apply to any program, no? "cat", "diff", "sh",
PE> "node",....

PE> Not sure why "ls" needs a convenience flag that would complicate the
PE> documentation and maintenance and be so rarely useful.

OK, then I'll close the bug then.

[Message part 3 (message/rfc822, inline)]
From: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>
To: bug-coreutils <at> gnu.org
Subject: Offer ls --limit=...
Date: Sun, 24 Jan 2021 05:13:17 +0800
I hereby propose "ls --limit=..."

$ ls --limit=1 # Would only print one result item:
A

You might say:
"Jacobson, just use "ls|sed q". Closed: Worksforme."

Ah, but I am talking about items, not lines:

$ ls
A  B  C  D
E  F  G  H
I  J  K  L
$ ls -C|sed 2q
A  B  C  D
E  F  G  H
$ ls -C --limit=2
A        B
$ ls    --limit=2
A        B

Indeed, directories might be huge. And any database command already has
a --limit option these days, and does not rely on a second program to
trim its output because it can't control itself. Indeed, on some remote
connections one would only want to launch one program, not two. Thanks.



This bug report was last modified 4 years and 113 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.