bug#52453: Full timezone name
>>>>> "PE" == Paul Eggert writes: PE> On 12/12/21 07:27, 積丹尼 Dan Jacobson wrote: >> Also mention something about how to get the full timezone name. PE> Unfortunately at the coreutils level that information is not available PE> in any portable or reliable way. OK. Good. At the bottom of the page do mention that. Else people wonder why it is not one of the choices.
bug#52453: Full timezone name
On (info "(coreutils) Time conversion specifiers") ‘%Z’ alphabetic time zone abbreviation (e.g., ‘EDT’), or nothing if no time zone is determinable. See ‘%z’ for how it is determined. Also mention something about how to get the full timezone name. E.g., show instead of CST: Central Standard Time, or China Standard Time, or China Central Standard Time, etc.
bug#51288: Break date SYNOPSIS into two sections
On the 'date' man and info pages, SYNOPSIS date [OPTION]... [+FORMAT] date [-u|--utc|--universal] [MMDDhhmm[[CC]YY][.ss]] Synopses: date [OPTION]... [+FORMAT] date [-u|--utc|--universal] [ MMDDhhmm[[CC]YY][.ss] ] please break these down into: printing the date: date [OPTION]... [+FORMAT] setting the date: date [-u|--utc|--universal] [ MMDDhhmm[[CC]YY][.ss] ] date [-s|--set] DATESTR else the user in a panic to set the date, will try # date -s 10140110 date: cannot set date: Invalid argument Mon Jan 10 00:00:00 LMT 1014 Instead of $ date10140110 Only on (info "(coreutils) Setting the time") is the mystery revealed. P.S., on that page you should mention the MMDDhhmm... string again, not just its components.
bug#50694: ls and cpio's idea of "six months ago" are slightly different
What a headache. "Six months ago" means slightly different things to cpio and ls. And ls documents do say exactly what, and cpio documents don't even say six months. $ cat prover set -eu cd /tmp for i in `seq 170 190` do touch -d "$i days ago" x { env - ls -l x|tr -s ' ' ls x|cpio -o 2>&-|cpio -tv 2>&-|tr -s ' ' } > z if test `sort -u z|wc -l` != 1 then cat z; echo fi done $ sh prover -rw-r--r-- 1 jidanni jidanni 0 Mar 23 12:47 x -rw-r--r-- 1 jidanni jidanni 0 Mar 23 2021 x -rw-r--r-- 1 jidanni jidanni 0 Mar 22 12:47 x -rw-r--r-- 1 jidanni jidanni 0 Mar 22 2021 x So two things that should look the same ... don't. What's worse is there is no option to change cpio's date format. Well then just change ls's date format to match cpio's right? Well yes, but then there is no way to change ls's idea of six months, even if we examined cpio's source code to find out what it uses. $ ls --version ls (GNU coreutils) 8.32 Copyright (C) 2020 Free Software Foundation, Inc. $ cpio --version cpio (GNU cpio) 2.13 Copyright (C) 2017 Free Software Foundation, Inc.
bug#49764: tr invocation INFO page missing list of options
(info "(coreutils) tr invocation") all the options don't appear together on the same page. Only the man page's DESCRIPTION has them all together.
bug#49503: Mention workarounds, so one could achieve the Debian version sorting algorithm
(info "(coreutils) Differences from the official Debian Algorithm") and (info "(coreutils) Minus/Hyphen and Colon characters") could mention workarounds, so one could indeed achieve the Debian Algorithm. Or mention the only way is to use dpkg --compare-versions (on pairs only.)
bug#48248: tr docs: mention what to expect now vs. future
(info "(coreutils) tr invocation") says Currently ‘tr’ fully supports only single-byte characters. Eventually it will support multibyte characters; when it does, the ‘-C’ And the man page has no warning at all. #BUG. Please add one. BTW, $ echo 哇|tr 哇 123 123 It works fine! (People will think.) Therefore be sure to mention just when it will start failing, with real examples, $ echo 哇|tr 哇 1 111 $ echo 哇|tr 哇 1234 123 $ echo 哇哇|tr 哇 1234 123123 $ echo 哇哇姑五湖|tr 哇 1234 1231231__五湖 $ echo "22°56'52.2\"N 121°14'09.3\"E" | tr ° d 22dd56'52.2"N 121dd14'09.3"E Also on the INFO page, give examples of, for the same input, what to expect now, and what to expect in the future.
bug#47891: sort --numeric-sort-Extra-Strength
Let's face it, sort, no matter what --option, or LC_... value, just can't achieve this order: 3-1號邊 3號之1 3號之2 30 What's the miracle kid (me) doing right that sort(1) just can't sort out yet? Mom told me "Just sort by numbers." See https://www.jidanni.org/geo/house_numbering/sorting/ in your spare time.
bug#47859: Additional seq outlandish example: seq 0 dangers
On (info "(coreutils) seq invocation") we read Be careful when using ‘seq’ with outlandish values: otherwise you may... Here's another 'fun/sad/DDOS yourself' example you might add: One day I wrote a Makefile, m: seq 0 9|sed s/$$/號.html/|xargs make but before using it, I though I'll just test with one item, m: seq 0 |sed s/$$/號.html/|xargs make well of course... as seq prints nothing here, this triggered a massive ever growing recursive loop... Yes, all my fault for picking 0. I'll pick 1 next time. P.S., perhaps document how to get seq to cough up just "0". One way I found was: $ seq 0 1 0 0
bug#47858: Document that FULLWIDTH DIGITs boggle coreutils brain currently
(info "(coreutils) Correct/Incorrect ordering and Expected/Unexpected results") needs to "admit" or "at least mention" that "coreutils just hasn't thought about FULLWIDTH DIGITs yet." I.e., Europeans are in luck. East Asians are out of luck. $ seq 9 11|sort 10 11 9 $ seq 9 11|sort -n 9 10 11 $ seq 9 11|sort -V 9 10 11 $ echo -e 9\\n10\\n11|sort 10 11 9 $ echo -e 9\\n10\\n11|sort -V 10 11 9 $ echo -e 9\\n10\\n11|sort -n 10 11 9 $ unicode 9 U+FF19 FULLWIDTH DIGIT NINE UTF-8: ef bc 99 UTF-16BE: ff19 Decimal: Octal: \0177431 9 Category: Nd (Number, Decimal Digit); East Asian width: F (fullwidth) Unicode block: FF00..FFEF; Halfwidth and Fullwidth Forms Numeric value: 9 Digit value: 9 Bidi: EN (European Number) Decomposition: 0039 Nope, LC_ALL=zh_TW.UTF-8 didn't help. sort (GNU coreutils) 8.32
bug#47700: Backup options vs. file extensions
(info "(coreutils) Backup options") is great, except, it needs examples of how one can preserve file extension with it. E.g., x.jpg~ messes up plenty of viewers, but x~.jpg is fine. Same with numbered backups. So the page should discuss this problem, and mention workarounds.
bug#47703: Mention if ln -s needs -r, or ln -r needs -s
man ln says: -r, --relative create symbolic links relative to link location -s, --symbolic make symbolic links instead of hard links Does -s need -r, or -r need -s? Hard to tell from the man page. Had to find out the 'hard' way. Please mention the answer on the man page. Thanks.
bug#47702: wc man page: first you are talking about bytes, then you are talking about characters
Man wc says Print newline, word, and byte counts for each FILE, and a total line if more than one FILE is specified. A word is a non-zero-length sequence of characters delimited by white space. first you are talking about bytes, then you are talking about characters. So for the latter, please say characters (not bytes) or characters (same as bytes) or just bytes Yes, even if explained in the INFO file. Thanks.
bug#47701: Add ln --dry-run
$ ln -rbsv ~/Downloads/*/95*[0-9].jpg xiangpianjibentu 'xiangpianjibentu/95212025.jpg' -> '../../../../Downloads/ViewLarge_Draw_files/95212025.jpg' 'xiangpianjibentu/95212033.jpg' -> '../../../../Downloads/ViecccwLarge_Draw_files/95212033.jpg' 'xiangpianjibentu/95212025.jpg~' ~ 'xiangpianjibentu/95212025.jpg' -> '../../../../Downloads/ViewLarge_Draw_files/95212025.jpg' 'xiangpianjibentu/95212026.jpg' -> '../../../../Downloads/ViewLargeddd_Draw_files/95212026.jpg' 'xiangpianjibentu/95212034.jpg' -> '../../../../Downloads/ViewLargvvve_Draw_files/95212034.jpg' 'xiangpianjibentu/95212045.jpg' -> '../../../../Downloads/ViewxxxLarge_Draw_files/95212045.jpg' Wow, that was a pretty fancy result. However the only way to find out what will happen is to cross one's fingers and run the command and hope for the best. So perhaps add a --dry-run. It would print (when -v is used), but not do, the above. (Except probably for the one backup file.) Anyway, we all know that sometimes ln syntax is tricky, so perhaps add --dry-run.
bug#47353: Numbered backups also need kept-new-versions else will grow out of control
All I am saying is 'to acknowledge the hazards'... 'Advisory on prolonged use'. 'Note about health effects of unattended use.' For all the user knows reading (info "(coreutils) Backup options") maybe numbered backups even just means one backup, numbered ...1.
bug#47353: Numbered backups also need kept-new-versions else will grow out of control
> "CE" == Chris Elvidge writes: CE> So 'use common sense to limit disk space used' has to be stated in the CE> manual? Hmmm, yes. And also mention in the manual that e.g., emacs has methods to trim these automatically, but coreutils hasn't implemented them yet. Else users will write elaborate programs to do it, thinking that nobody thought about it yet.
bug#46346: wc --human-readable or --verbose
wc needs a --verbose option. Else one is forced to do: $ file=e.html; echo $file:; for i in bytes chars lines words; do echo -en $i:\\t; wc --$i < $file; done e.html: bytes: 31655 chars: 29141 lines: 643 words: 1275 I mean sometimes we want to send the output to a real person, and currently all wc makes is: $ wc e.html 643 1275 31655 e.html $ file=e.html; for i in bytes chars lines words; do wc --$i < $file; done 31655 29141 643 1275 So there needs to be a --verbose or --human-readable like du(1)... oops I don't mean saying 234M... yet.
bug#46060: Offer ls --limit=...
> "PE" == Paul Eggert 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.
bug#46060: Offer ls --limit=...
E.g., "What is API pagination? Some APIs, such as Contacts can return millions of results. We obviously can't return all of them at once, so we need to return a subset - or a page - at a time. This technique is called paging and is common to most APIs. Paging can be implemented in many different ways, some better than others." Anyway, this ls command was built in the early years of computer science...
bug#46060: Offer ls --limit=...
Sure, it is against the https://en.wikipedia.org/wiki/Unix_philosophy, but just like SQL has LIMIT, and $ unicode --help -m MAXCOUNT, --max=MAXCOUNT Maximal number of codepoints to display... Just like "we want to stop pollution at the source", not always "clean up after it".
bug#46060: Offer ls --limit=...
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 AB $ ls--limit=2 AB 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.
bug#44975: Warn that fold will wreck UTF-8
On (info "(coreutils) fold invocation") warn that fold will wreck UTF-8 files, shattering any multibyte character that unfortunately lies near its chopper. (GNU coreutils) 8.32
bug#44959: date error message should say -I
Well OK, but when and when not to use the "=" is not revealed by the otherwise detailed error messages. So unless the user checks the manual, they will never "get it".
bug#44960: date --expose-flags
date +%Y-%m-%dT%H:%M:%S%z ^I meant %:z > Then one needn't use trial and error (Driving my point home.)
bug#44960: date --expose-flags
I got this brilliant idea. Let's say one likes the output of $ date --iso-8601=seconds 2020-11-30T21:15:47+08:00 but wants to know "how you did it?" Hmmm, no assistance from $ date --iso-8601=seconds --debug 2020-11-30T21:15:50+08:00 Ah, if only there were a: $ date --iso-8601=seconds --expose-flags date +%Y-%m-%dT%H:%M:%S%z Then one needn't use trial and error to figure out the template being used behind the scenes! date (GNU coreutils) 8.32
bug#44959: date error message should say -I
$ date -I=seconds date: invalid argument ‘=seconds’ for ‘--iso-8601’ Hey, that is a valid argument for --iso-8601. (But not for -I, so say that instead.) Here is a real invalid argument: $ date --iso-8601=secondsz date: invalid argument ‘secondsz’ for ‘--iso-8601’ date (GNU coreutils) 8.32
bug#44770: chown: warn about the dot when encountering it
Maybe print warning messages when encountering the dot, (info "(coreutils) chown invocation") Else Grandpa won't ever know, https://github.com/scop/bash-completion/issues/468 until one day when it's too late... (And his program starts messing things up on some other system.)
bug#40943: nl: add way to exclude matching lines from getting numbered!
(info "(coreutils) nl invocation") says ‘pBRE’ number only lines that contain a match for the basic regular expression BRE. *Note Regular Expressions: (grep)Regular Expressions. OK, but add a new functionality: ‘PBRE’ Do NOT number lines that contain a match for the basic regular expression BRE. *Note Regular Expressions: (grep)Regular Expressions. $ nl --version nl (GNU coreutils) 8.30
bug#40942: Clean up mailing list confusion on web page
https://www.gnu.org/software/coreutils/ mentions coreut...@gnu.org and bug-coreutils@gnu.org (and the term mailing list and the term bug tracker many times, all intertwined and perhaps repeating.) Maybe only mention each one once, with a description of what they are below it. So that would be a total of two items.
bug#40633: Document / implement sorting via absolute value
(info "(coreutils) sort invocation") should mention how to sort via absolute value, or add an option to do it. Currently one must use e.g., $ seq -2 2|perl -pe 's/^(-)(.*)/$2$1/;' | sort -n 0 1 1- 2 2-
bug#40363: date: add Julian day number output format
date(1) should add "Julian day number" or the "Astronomical day number" (see (info "(emacs) Calendar Systems") output format. Else for crontab(5) one must do # Run once per 48 hours (every other day), even across week, month, and year boundaries: 33 22 * * * expr $(date +\%s) / 60 / 60 / 24 \% 2 > /dev/null && echo Check the toilet tissue. Instead of just 33 22 * * * expr $(date +\%J) \% 2 > /dev/null && echo Check the toilet tissue. (assuming %J is the Julian day number.) Currently you have day of the week, day of the month, day of the year, seconds from second #1. Years from year #1, but no days from "day #1".
bug#39613: stat(1) shouldn't call permissions "Access..."
(info "(coreutils) stat invocation") says, • %a - Access rights in octal (note ‘#’ and ‘0’ printf flags) • %A - Access rights in human readable form But man find says, -perm mode File's permission bits are exactly mode (octal or symbolic). Since an exact match is required, if you want to use this form for symbolic modes, you may have to specify a rather complex mode string. For example `-perm g=w' will only match files which have mode 0020 (that is, ones for which group write permission is the only permission set). It is more likely that you will want to use the `/' or `-' forms, for example `-perm -g=w', which matches any file with group write permission. See the EXAMPLES section for some illustrative examples. -perm -mode All of the permission bits mode are set for the file. Symbolic modes are accepted in this form, and this is usually the way in which you would want to use them. You must specify `u', `g' or `o' if you use a symbolic mode. See the EXAMPLES section for some illustrative examples. -perm /mode Any of the permission bits mode are set for the file. Symbolic modes are accepted in this form. You must specify `u', `g' or `o' if you use a symbolic mode. See the EXAMPLES section for some il‐ lustrative examples. If no permission bits in mode are set, this test matches any file (the idea here is to be consistent with the behaviour of -perm -000). -perm +mode This is no longer supported (and has been deprecated since 2005). Use -perm /mode instead. So stat's man and Info pages shouldn't use "Access" to talk about them. Especially as it pretty much means something else: -readable Matches files which are readable by the current user. This takes into account access control lists and other permissions artefacts which the -perm test ignores. This test makes use of the access(2) system call, and so can be fooled by NFS servers which do UID mapping (or root-squashing), since many systems implement access(2) in the client's kernel and so cannot make use of the UID mapping information held on the server.
bug#39017: Mention more about uniq failure exit status
(info "(coreutils) uniq invocation") says An exit status of zero indicates success, and a nonzero value indicates failure. The user wonders: "Failure to make a file unique because it was already unique?" Be more explicit.
bug#38780: date: next feb 11
date -d should add a way to say "next feb 11" or "next 2/11" etc. E.g., at(1) knows we are always talking about the coming Feb. 11, and not the one that has already passed in the current year. Just like we can say "next Friday" and "last Friday" currently.
bug#36220: ls -l: maddening mixed left right justifications with numeric ids
> "PE" == Paul Eggert writes: PE> On 6/17/19 8:12 AM, Pádraig Brady wrote: PE> I prefer the current ("maddening") behavior, as it gives the reader a PE> useful signal that the user is numeric rather than textual. This is PE> particularly important when a user name consists entirely of digits, PE> which is allowed on some systems. In that case, left alignment of a PE> string like "" means it's a textual user name, whereas right PE> alignment means it's a numeric user ID. Admittedly the disambiguation PE> is not perfect (as there is no cue when the user name has the maximum PE> width) but it's helpful in common practice. PE> I thought this was all documented somewhere - at least, it was a PE> conscious decision when I wrote that code long ago. Indeed all you need to do would me mention the logic there on INFO "ls" and we would realize that this was actually a feature.
bug#36220: ls -l: maddening mixed left right justifications with numeric ids
> "PB" == Pádraig Brady writes: PB> to know if it was a common issue, as I've not encountered it at least. Well as the anbox Android emulator could possibly become very popular, ls should be ready for a big influx of numeric ids.
bug#35748: Add cut FIELD-LIST examples
> "EB" == Eric Blake writes: EB> No need to open a second bug to tell us that the first was not a problem EB> after all. I'm merging the two bugs in the database, and marking the EB> issue closed. It takes several minutes before the bug number is created, so there is a tradeoff between proper vs. speedy followups.
bug#35748: Add cut FIELD-LIST examples
Oh, I see, it is mentioned above it. Sure wish "(see above)" was there.
bug#35747: Add cut FIELD-LIST examples
On (info "(coreutils) cut invocation") with no examples for ‘-f FIELD-LIST’ ‘--fields=FIELD-LIST’ Select for printing only the fields listed in FIELD-LIST. Fields are separated by a TAB character by default. Also print any line that contains no delimiter character, unless the ‘--only-delimited’ (‘-s’) option is specified. one might even one is to put tabs in our FIELD-LIST, or maybe dashes or commas. And maybe ranges are not supported, etc.
bug#35343: sort: printing characters: define
Well all I know is e.g., perl's man perlrecharclass is more detailed than (info "(coreutils) Character sets") section, (which (info "(coreutils) sort invocation") perhaps should also link to.) Anyways, coreutils should at least link to a definite statement...
bug#35431: Mention "cp -l a b is exactly equivalent to ln a b"
On (info "(coreutils) cp invocation") at ‘-l’ ‘--link’ Make hard links instead of copies of non-directories. Mention "Exactly equivalent to ln." or "cp -l a b is exactly equivalent to ln a b." Or if not, mention why.
bug#35343: sort: printing characters: define
(info "(coreutils) sort invocation") says ‘-i’ ‘--ignore-nonprinting’ Ignore nonprinting characters. The ‘LC_CTYPE’ locale determines character types... Well this leaves the user high and dry trying to figure out what you mean by printing characters. Is SPC a printing character he wonders. It makes the printer head advance one unit, whereas ESC doesn't. So at least mention the ASCII range [A-Z...] of what your are talking about. It would only take up a word or two of the INFO page. Anyway, each program might have their own idea of "printing characters" as well as grandpa down the hall's definition. So the user is left unsure.
bug#35336: date should respect TIME_STYLE too
All the other utilities respect the environment variable ‘TIME_STYLE’, except date(1) itself! Date should be no different...
bug#35335: touch --verbose
Say, rm, cp, mv have --verbose. How about for touch too? Then one wouldn't need $ set -x; touch /tmp/{a,b,c}.el; set +x + touch /tmp/a.el /tmp/b.el /tmp/c.el to see what it was touching or not.
bug#34988: mv: check before asking users useless questions
> "LSS" == Leslie S Satenstein writes: LSS> Did you consider that more than one terminal can be open, and at the LSS> second terminal, "b" could be renamed before replying to the mv LSS> command? I don't know about all that. Let's hope the designers consider all aspects.
bug#34664: Mention wc default action on man page
Well > Print newline, word, and byte counts might sound like > Play movies, audio files, and even ... Sort of like a list of capabilities. > "PB" == Pádraig Brady writes: PB> I'm confused. It says 'bytes', and means it. PB> One has to specify -m to select characters. But OK, fine.
bug#34670: Implement "seq infinity"
I can do $ sleep infinity so why not $ seq infinity also?
bug#34669: Document sleep infinity
$ man sleep | grep -ic infinity 0 $ sleep --help | grep -ic infinity 0 $ info sleep | grep -ic infinity 0 $ /bin/sleep infinity #But it still works, so please document it.
bug#34664: Mention wc default action on man page
INFO says By default, ‘wc’ prints three counts: the newline, words, and byte and wc --help even more so. Alas man wc doesn't say if what we are looking at is bytes or characters, so kindly mention the default on the man page!
bug#34488: Add sort --limit, or document workarounds for sort|head error messages
Thanks for working on this guys, hopefully users will one day no longer be faced with (yes, seemingly) random errors. $ ls -l | sed 2!d drwxr-xr-x 14 jidanni jidanni 4096 2016-12-24 AndroidMisc $ ls -l | sed 2q total 157780 drwxr-xr-x 14 jidanni jidanni 4096 2016-12-24 AndroidMisc ls: write error: Broken pipe
bug#34490: console the user that his -n in sort --debug -n was seen
> "PB" == Pádraig Brady writes: PB> Fair point. I'm thinking of this extra qualification: PB> sort: text ordering performed using ‘en_IE.UTF-8’ sorting rules Maybe say 'LC_CTYPE=en_IE.UTF-8' sorting rules PB> sort: text ordering performed using simple byte comparison sort: text ordering performed using simple byte (LC_CTYPE=C) comparison or something like that.
bug#34488: Add sort --limit, or document workarounds for sort|head error messages
(I recall I heard about 50 years ago when pipe buffers first came to Unix they were supposed to be invisible to the user...)
bug#34475: Mention even more worries for test -a
By the way https://lists.gnu.org/archive/html/bug-bash/2019-02/msg00052.html says "... contradictory description in the coreutils info document."
bug#34488: Add sort --limit, or document workarounds for sort|head error messages
> "EB" == Eric Blake writes: >> And no fair saying "just save the output" (could be big) "into a file >> first, and do head(1) or sed(1) on that." EB> If you have an app that exits noisily on write failures to an early-exit EB> pipe, your solutions are to quit ignoring SIGPIPE, or to change the EB> pipeline to consume all of the output instead of exiting early and EB> causing write failure. OK, it seems that indeed it would then be best to document: If you want to make sure no such errors occur on large output, instead of $ sort | head use $ sort > file; head file as an _easy to remember_ alternative amongst the many. And OK put this in some general place, and have the sort, etc. pages link to it. Thanks.
bug#34490: console the user that his -n in sort --debug -n was seen
Can you please have assure the user in that message it makes that it has indeed seen his -n/--numeric-sort. $ sort --debug sort: using simple byte comparison $ sort --debug --numeric-sort sort: using simple byte comparison unchanged. User gets nervous. sort (GNU coreutils) 8.30. Sorry we discussed this before but kinda hard to find...
bug#34488: Add sort --limit, or document workarounds for sort|head error messages
> "AG" == Assaf Gordon writes: AG> The errors are not "random" - they happen because you explicitly AG> cut short the output of a program. Well the user thinks "hey I cut short 5 lines, 45 lines, 495 lines, and then one I got a job at a big company and cut short 4995 lines and got this error message just when the boss was looking." So be sure to mention it. Thanks.
bug#34488: Add sort --limit, or document workarounds for sort|head error messages
Things start out cheery, but quickly get ugly, $ for i in 9 99 999 9; do seq $i|sort -n|sed 5q|wc -l; done 5 5 5 5 sort: write failed: 'standard output': Broken pipe sort: write error 5 sort: write failed: 'standard output': Broken pipe sort: write error Therefore, kindly add a sort --limit=n, and/or on (info "(coreutils) sort invocation") admit the problem, and give some workarounds, lest our scripts occasionally spew error messages seemingly randomly, just when the boss is looking. And no fair saying "just save the output" (could be big) "into a file first, and do head(1) or sed(1) on that."
bug#34475: Mention even more worries for test -a
First, on the test(1) man page, at EXPRESSION1 -a EXPRESSION2 both EXPRESSION1 and EXPRESSION2 are true EXPRESSION1 -o EXPRESSION2 either EXPRESSION1 or EXPRESSION2 is true Say instead EXPRESSION1 -a EXPRESSION2 both EXPRESSION1 and EXPRESSION2 are true (See warning NOTE below.) EXPRESSION1 -o EXPRESSION2 either EXPRESSION1 or EXPRESSION2 is true (See warning NOTE below.) else users who never make it down to the "fine print at bottom" will blithefully use them a lifetime without ever an inkling of the dangers! (Indeed on (info "(coreutils) Connectives for test") you discuss the dangers first, before even letting the users eyeballs touch the syntax!) Also on both man and info pages you need to warn of portability worries, e.g., in bash we see -a and -o do even more things. $ help test|egrep -- ' -(a|o) ' -a FILETrue if file exists. -o OPTION True if the shell option OPTION is enabled. EXPR1 -a EXPR2 True if both expr1 AND expr2 are true. EXPR1 -o EXPR2 True if either expr1 OR expr2 is true.
bug#34347: At least add 2nd comm error message after output
(info "(coreutils) comm invocation") "Before ‘comm’ can be used, the input files must be sorted" "If an input file is diagnosed as being unsorted, the ‘comm’ command will exit with a nonzero status (and the output should not be used). ^ "Forcing ‘comm’ to process wrongly sorted input files ... is not guaranteed to produce any particular output. The output will probably not correspond with whatever you hoped it would be." OK, so I would change the default. The new default should be: before producing even a line of output, check both files. If either of them is in order, print the error message, and exit non-zero... _without any line of output!_ Because currently, $ seq 55 > 5 $ seq 55 |tac > 5r $ comm 5 5r just causes the error messages to fly off the screen, leaving only the savvy user, who checks exit values, to have any inkling that there is a problem, and he should not order futher warships, airplanes, etc. based on the results after all. OR, be so kind as to add a second error message after all the output is printed, so it won't fly off the screen.
bug#34026: mention that long options aren't always as good as short options
Yes do warn in the manual, as here root (so no $HOME) expected tilde expansion... Thanks.
bug#34026: mention that long options aren't always as good as short options
On (info "(coreutils) Common options") mention that, though clearer, long options aren't always as good as short options, $ touch --reference=~jidanni/.pcmanx /cf/pcmanx_time touch: failed to get attributes of '~jidanni/.pcmanx/pcmanx': No such file or directory Unless one removes the '=': $ touch --reference ~jidanni/.pcmanx/pcmanx /cf/pcmanx_time $ (due to the shell helping out with "~...")
bug#34009: warn that mkdir --mode doesn't affect parents created
On man mkdir -m, --mode=MODE set file mode (as in chmod), not a=rwx - umask -p, --parents no error if existing, make parent directories as needed do warn that --mode doesn't affect any parents created. $ mkdir --mode 700 -p /tmp/g/h/i $ find /tmp/g -ls 55795 0 drwxr-xr-x 3 jidanni jidanni60 Jan 7 23:30 /tmp/g 55796 0 drwxr-xr-x 3 jidanni jidanni60 Jan 7 23:30 /tmp/g/h 55797 0 drwx-- 2 jidanni jidanni40 Jan 7 23:30 /tmp/g/h/i Also warn on (info "(coreutils) mkdir invocation") more directly. Thanks.
bug#26902: good invalid dates vs. bad invalid dates
Maybe it should try to pass on to the user at least an error code: Invalid date: error code 0754, or even better, an mention of what error it hit.
bug#33025: Add examples of why one would want to "sort" something "randomly"
> "AG" == Assaf Gordon writes: AG> (It doesn't deal with "why", that is left to the users to decide when AG> they need it, but it shows clear examples of how to use it). Maybe add "For example, you might want to hear your songs in a fresh fun order. Or make sure your program still works even if the moms come between or after the pops..." https://www.google.com/search?q=reasons+for+random+order
bug#33577: ls lacks null terminator option
Fine. Put a message on top of (info "(coreutils) ls invocation") saying that your pipes are better.
bug#33577: ls lacks null terminator option
Are you saying you want to enhance find(1) to sort its output?
bug#33577: ls lacks null terminator option
Don't let that ls colors stuff fool you. It originally didn't have that.
bug#33577: ls lacks null terminator option
(Probably The Unix Programming Environment by K & P.)
bug#33577: ls lacks null terminator option
Bob, I remember from my K Unix book that ls can be used in scripts. In fact that is why $ ls acts different than $ ls | cat Plus there are lots of things ls can do that find cannot. For instance sorting. How are you going to do $ ls -t with find?
bug#33577: ls lacks null terminator option
For files with blanks in their names, one shouldn't need this workaround: $ ls -t | tr \\n \\0 | xargs -0 more > /tmp/z.txt Please add a --print0 option. like find(1) has. ls (GNU coreutils) 8.30
bug#23302: mention what are nonprinting characters
Good! You need to then tie all the documentation you found, into the coreutils documentation, as the official declaration of what you mean. Just like "man perlrecharclass - Perl Regular Expression Character Classes" does. I mean one cannot just hope the user will "Google" and then land on "Wikipedia" and hope what is there is 100% the same.
bug#23302: mention what are nonprinting characters
Yes but every program has slightly different sets of non-printing characters, so they need to list them exactly.
bug#21349: acknowledged by developer (Re: bug#21349: who shows no users nowadays on Debian)
(Today on Debian I see $ who jidanni pts/02018-10-25 06:26 (:0) So maybe this is fixed.)
bug#18479: acknowledged by developer ()
As you can see, the Subject got damaged somehow when sending this message to me. (Subject: Re: bug#18479 acknowledged by developer ()) > "GbTS" == GNU bug Tracking System writes: GbTS> This is an automatic notification regarding your bug report GbTS> #18479: date -d 'today - month', GbTS> which was filed against the coreutils package. GbTS> Thank you for your report, which has now been closed. GbTS> You can view the full report at GbTS> http://debbugs.gnu.org/cgi/bugreport.cgi?bug=18479 GbTS> If you require further information, please followup to 18...@debbugs.gnu.org. GbTS> debbugs.gnu.org maintainers GbTS> (administrator, GNU bugs database)
bug#14971: acknowledged by developer (Re: bug#14971: split man page table mushed)
Say, can we get the final information just from this email next time, just like in Debian. Where one doesn't need to click on the link to see how the bug was solved. > "GbTS" == GNU bug Tracking System writes: GbTS> This is an automatic notification regarding your bug report GbTS> #14971: split man page table mushed, GbTS> which was filed against the coreutils package. GbTS> Thank you for your report, which has now been closed. GbTS> You can view the full report at GbTS> http://debbugs.gnu.org/cgi/bugreport.cgi?bug=14971 GbTS> If you require further information, please followup to 14...@debbugs.gnu.org. GbTS> debbugs.gnu.org maintainers GbTS> (administrator, GNU bugs database)
bug#18328: can't say date -d '8pm -0500' though other combos work
AG> I hope to get to this bug soon. Good.
bug#33025: Add examples of why one would want to "sort" something "randomly"
On (info "(coreutils) sort invocation") ‘-R’ ‘--random-sort’ ‘--sort=random’ Sort by hashing the input keys and then sorting the hash values. Choose the hash function at random, ensuring that it is free of collisions so that differing keys have differing hash values. This is like a random permutation of the inputs (*note shuf invocation::), except that keys with the same value sort together... OK, but you need to mention some examples of why someone would want to "sort" something "randomly". OK, I have one: You have a list of URLs. You know there are probably duplicates in there, that you want to get rid of. But you also don't want to make it look like you have "machine sorted them." You want them to still look "hand assembled." So you use sort --random-sort --unique on them!
bug#31055: Document ls -Ur -fr
(info "(coreutils) Sorting the output") says ‘-r’ ‘--reverse’ Reverse whatever the sorting method is—e.g., list files in reverse alphabetical order, youngest first, smallest first, or whatever. OK but mention 'whatever' doesn't mean -U, -f, because they are sorted in "unsorted" order. In fact perhaps trigger an error. Actually directory order is still an order, so in fact it is odd that -r is "broken" here.
bug#31038: mv copies in ls -r order
OK. Please on (info "(coreutils) cp invocation") at ‘-v’ ‘--verbose’ Print the name of each file before copying it. add: "(Note this reveals internal order of operations, often in ls -U order, thus occasionally appearing to be in ls, ls -t, ls -r, ls -rt etc. order.)" (I mean on the same page you do go into such details: ‘-a’ ‘--archive’ Preserve as much as possible of the structure and attributes of the original files in the copy (but do not attempt to preserve internal directory structure; i.e., ‘ls -U’ may list the entries in a copied directory in a different order). Try to preserve SELinux security context and extended attributes (xattr), but ignore any failure to do that and print no corresponding diagnostic. Equivalent to ‘-dR )
bug#31038: mv copies in ls -r order
OK maybe I was just looking at the latter half of $ sh O /tmp created directory '/var/tmp/y' copied 'x/1' -> '/var/tmp/y/1' copied 'x/2' -> '/var/tmp/y/2' copied 'x/3' -> '/var/tmp/y/3' copied 'x/4' -> '/var/tmp/y/4' copied 'x/5' -> '/var/tmp/y/5' copied 'x/6' -> '/var/tmp/y/6' copied 'x/7' -> '/var/tmp/y/7' copied 'x/8' -> '/var/tmp/y/8' copied 'x/9' -> '/var/tmp/y/9' removed 'x/9' removed 'x/8' removed 'x/7' removed 'x/6' removed 'x/5' removed 'x/4' removed 'x/3' removed 'x/2' removed 'x/1' removed directory 'x' $ cat O set -eu cd /tmp mkdir x cd x seq 9|xargs touch cd - mv -v x /var/tmp/y
bug#31038: mv copies in ls -r order
$ mv -v dir1/* dir2 reveals that mv works backwards, copying in ls -r order. Well OK, but why is that order better than the order of the arguments it was given?
bug#29604: man cut should mention no way to do ls -l|cut ...
> "EB" == Eric Blakewrites: EB> Let's step back a bit. We recommend that you NEVER parse ls output, as No problem. Any example of what can't be parsed would be fine. Even e.g., EB> Eric Blake, Principal Software Engineer EB> Red Hat, Inc. +1-919-301-3266 EB> Virtualization: qemu.org | libvirt.org your signature, with differing lengths of whitespace. Whatever.
bug#29604: man cut should mention no way to do ls -l|cut ...
On (info "(coreutils) cut invocation") ‘-d INPUT_DELIM_BYTE’ ‘--delimiter=INPUT_DELIM_BYTE’ With ‘-f’, use the first byte of INPUT_DELIM_BYTE as the input fields separator (default is TAB). please mention there is no way to indicate more than one character, thus no way to process $ ls -l | cut ... and that one should use awk, etc. for that. Also mention it on the cut(1) man page.
bug#29044: sort --debug results improvement
< P.S., Yes indeed I had LC_COLLATE=C so maybe --debug should mention < where in the environment it made it choices from too. Ah, like you said $ LC_ALL=en_CA.UTF-8 sort --debug < /dev/null sort: using ‘en_CA.UTF-8’ sorting rules $ LC_ALL=C sort --debug < /dev/null sort: using simple byte comparison So the last line should be sort: using 'C' sorting rules (simple byte comparison) or maybe also say "effective LC_COLLATE value is "..
bug#29044: sort --debug results improvement
Your answer is absolutely pure gold for a new page linked from ‘--debug’ Highlight the portion of each line used for sorting. Also issue warnings about questionable usage to stderr. in the Info manual! Please don't let it go to waste sitting in the bug tracker. Perhaps call it Debugging examples. You can pretty much just quote the entire exchange between you and me. P.S., Yes indeed I had LC_COLLATE=C so maybe --debug should mention where in the environment it made it choices from too.
bug#28735: say "by the current user"
On (info "(coreutils) Access permission tests") don't say ‘-r FILE’ True if FILE exists and read permission is granted. ‘-w FILE’ True if FILE exists and write permission is granted. ‘-x FILE’ True if FILE exists and execute permission is granted (or search permission, if it is a directory). Say ... "is X-able by the current user." Same on the ls man page. Else you are not being clear if this is just testing if a certain bit has been set, vs. something to do with the current user vs. the file owner!
bug#27786: tr: accept hex ranges as well as octal
In (info "(coreutils) Character sets") ‘\OOO’ The 8-bit character with the value given by OOO, which is 1 to 3 octal digits. Note that ‘\400’ is interpreted as the two-byte sequence, ‘\040’ ‘0’. OK but do add hex too. Hmm, I probably reported this before but can't tell because I'm offline while I'm writing this, and it is too important anyway for me to check vs. mentioning again.
bug#27785: tr: mention that leading zeros are a no-no in e.g., \0377
In (info "(coreutils) Character sets") ‘\OOO’ The 8-bit character with the value given by OOO, which is 1 to 3 octal digits. Note that ‘\400’ is interpreted as the two-byte sequence, ‘\040’ ‘0’. It is very important to also add here: and \0377 is interpreted as \037 and 7. (You add the quotes. I can't with my keyboard.)
bug#27482: date: minus and ago in same sentence
I got an idea. Please parse "one", "two", "three" (lower and upper case folded too.) 1. Because it is proper English. "1 day ago" is cellphone English. 2. Because there can't be that many of them... (seventy-three, seventy-four... well they are made up of other components...) 3. Because it will avoid the user getting these surprising results, $ date -d 'two weeks ago' date: invalid date ‘two weeks ago’ $ date -d 'now - two weeks ago' date: invalid date ‘now - two weeks ago’ $ date -d 'now - 2 weeks ago' Sun Jul 9 18:39:23 CST 2017 Or just catch the error of "-" and "ago" in the same sentence. Or perhaps warn on (info "(coreutils) Relative items in date strings") about minus and ago...
bug#26971: mv -v output ordering looks impossible
I don't think you guys should invent new eye-catching strings. Aren't there already standard ways to show what is going on under the hood? Let's see, sh -x uses + and ++... strace uses... maybe just use '# ' comments.
bug#26971: mv -v output ordering looks impossible
I'm fine with whatever you guys come up with, just don't R> - Leave the output like it was initially. else I'll just be back here five years later after forgetting the whole episode.
bug#26971: mv -v output ordering looks impossible
PB> So this is working across file systems Yes. >> '/home/jidanni/jidanni.org/location/grow/programs' -> '/tmp/programs' This says to me "I, the mv command, have just moved A to B. PB> create dir /tmp/programs If that (create B) is what it is doing in that step, then it should not mention the unrelated A. >> '/home/jidanni/jidanni.org/location/grow/programs/grow.tgz' -> >> '/tmp/programs/grow.tgz' This says to me "I am moving A/C to B/C". But there is no more A... at least that is what the user thinks... so how could it still move it. PB> I suppose we could distinguish the creation operations, though PB> note if the first attempted rename() worked for the source dir, PB> then there would have been just a single operation output like: PB> '/home/jidanni/jidanni.org/location/grow/programs' -> '/tmp/programs' Well all I know is if the user always can do something on one line, then he would expect a consistent number of -v output lines.
bug#26971: mu -v output ordering looks impossible
I do mv -v /home/jidanni/jidanni.org/location/grow/programs /tmp and see '/home/jidanni/jidanni.org/location/grow/programs' -> '/tmp/programs' '/home/jidanni/jidanni.org/location/grow/programs/grow.tgz' -> '/tmp/programs/grow.tgz' removed '/home/jidanni/jidanni.org/location/grow/programs/grow.tgz' removed directory '/home/jidanni/jidanni.org/location/grow/programs' but isn't that a rather impossible sequence? At least the first two? Well I don't know the best way to write it.
bug#26902: good invalid dates vs. bad invalid dates
Can you please don't say "invalid date" for everything invalid. $ date -d @1494439601675485 date: invalid date ‘@1494439601675485’ $ date -d 1494439601675485sec date: invalid date ‘1494439601675485sec’ $ date -d 1494439601675485seconds date: invalid date ‘1494439601675485seconds’ $ date -d @1494439601675485 date: invalid date ‘@1494439601675485’ $ date -d @1494439601675 date: invalid date ‘@1494439601675’ $ date -d @1 四 1月 1 08:00:01 CST 1970 $ date -d @149443960167 date: invalid date ‘@149443960167’ $ date -d @14944396016 date: invalid date ‘@14944396016’ $ date -d @1494439601 四 5月 11 02:06:41 CST 2017 $ date -d @zz date: invalid date ‘@zz’ On (info "(coreutils) Seconds since the Epoch") it says Traditional Unix systems count seconds with 32-bit two’s-complement integers and can represent times from 1901-12-13 20:45:52 through 2038-01-19 03:14:07 UTC. More modern systems use 64-bit counts of seconds with nanosecond subcounts, and can represent all the times in Please catch the cases where the user merely has entered too many digits for the computer in question, and say date: too far into the future. or date: too far into the future for current computer. or date: invalid date: too far into the future for current computer. Please don't just give the same message that you give if the user hasn't even entered one digit.
bug#26631: tr: extra operand ‘\\\\’
$ tr -s x -d '\\' tr: extra operand ‘’ Try 'tr --help' for more information. I only gave '\\'.
bug#25870: give an example to show what lines join -a and -v are talking about
I can't really tell, but it seems at the beginning there still lacks the most basic "Hi kids, here is the 'join' command. It takes one file with contents ... and and another file with contents ... and outputs ..." before you get into any more niceties.
bug#25870: give an example to show what lines join -a and -v are talking about
In (info "(coreutils) join invocation") ‘-a FILE-NUMBER’ Print a line for each unpairable line in file FILE-NUMBER (either ‘1’ or ‘2’), in addition to the normal output. OK but say if we can use both: -a 1 -a 2? (Answer: yes) And if so how to tell which lines are from which file (Answer: by their content only). ‘-v FILE-NUMBER’ Print a line for each unpairable line in file FILE-NUMBER (either ‘1’ or ‘2’), instead of the normal output. OK but say if we can use both: -v 1 -v 2? And if so how to tell which lines are from which file. And in fact give an example to show what lines -a and -v are talking about!
bug#25871: give plain join example first
In (info "(coreutils) join invocation") If the input has no unpairable lines, a GNU extension is available; (shouldn't that ";" be ":"?) the sort order can be any order that considers two fields to be equal if and only if the sort comparison described above considers them to be equal. For example: $ cat file1... OK, but perhaps in the previous paragraph give a mundane regular example of join usage, instead of the first example be this special exception.
bug#25833: fold -s ... but for more than just spaces
fold -s will break at spaces. But why not let the user also pick an arbitrary character, other than spaces, too?
bug#25745: make dd quiet except for warnings and errors
That was Info dd. man dd says status=LEVEL The LEVEL of information to print to stderr; 'none' suppresses everything but error messages, 'noxfer' suppresses the final transfer statistics, 'progress' shows periodic transfer statis- tics And when you think about it, the 0+0 records in 0+0 records out sure look like part of something called final transfer statistics...