Re: du enhancement

2023-10-19 Thread Kaz Kylheku
On 2023-10-19 20:42, Dragan Simic wrote: > On 2023-10-20 01:22, Rusty Duplessis wrote: >> Would be nice to have an option to append a / to the end of directory >> names, so that you can distinguish between a file and directory when >> using -a. Something like -F option to ls. > > That's a very go

Re: 'Cat' feature request

2023-12-25 Thread Kaz Kylheku
On 2023-12-22 10:09, Evan Tremblay wrote: > so, if you run: > cat * > > it wont run(unless you use --show-all). Are scrambling to win a stupidest post of 2023 contest or something?

Re: 'Cat' feature request

2023-12-25 Thread Kaz Kylheku
On 2023-12-25 16:58, Pádraig Brady wrote: > On 25/12/2023 21:25, Kaz Kylheku wrote: >> On 2023-12-22 10:09, Evan Tremblay wrote: >>> so, if you run: >>> cat * >>> >>> it wont run(unless you use --show-all). >> >> Are scrambling to win a stup

Re: 'Cat' feature request

2023-12-25 Thread Kaz Kylheku
On 2023-12-25 19:53, Kaz Kylheku wrote: > There are ways to speed it up by taking advantage of the contents of > the * expansions being sorted. We change the requirements to this: > we look for situations when the command line contains, as a contiguous > subsequence, the sequence

Re: 'Cat' feature request

2023-12-29 Thread Kaz Kylheku
On 2023-12-28 13:24, Bernhard Voelker wrote: > On 12/26/23 04:53, Kaz Kylheku wrote: >> The feature is actually implementable. The cat program has a way of >> determining that it has been passed all the names that may arise >> from the expansion of *. (Modulo a minor

Re: date does not support pipes

2024-01-15 Thread Kaz Kylheku
On 2024-01-12 20:14, Philip Rogers wrote: > Hi, > > `date` seems not to support reading from stdin. > > So if you want the "last data modification" date of a file, in ISO8601 format > at the seconds level, you have to: > > stat --format "%Y" check.txt | { read ts; date -d@"$ts"; } You want pro

Re: Unset ICRNL in CBREAK mode in stty(1) following X/Open Curses

2024-01-20 Thread Kaz Kylheku
On 2024-01-20 20:01, Soumendra Ganguly wrote: > Respected maintainers, > > In X/Open Curses, Issue 7 ( > https://pubs.opengroup.org/onlinepubs/9699909599/toc.pdf), the following is > mentioned about the cbreak mode: > > This mode achieves the same effect as non-canonical-mode, Case B input > proc

Re: Unset ICRNL in CBREAK mode in stty(1) following X/Open Curses

2024-01-22 Thread Kaz Kylheku
On 2024-01-21 22:41, Soumendra Ganguly wrote: > Doing this might be useful for users who expect curses like behavior > without having to worry about *what > exactly* needs to be done to get curses like behavior (such as clearing > ICRNL). I suspect that is only you, and when you've moved on from t

Re: [PATCH] mv: add --swap (-s) option to atomically swap 2 paths

2024-03-01 Thread Kaz Kylheku
On 2024-03-01 01:18, Pádraig Brady wrote: > I agree this is useful functionality, > but the thinking is we should add this to a "replace" utility > rather than to mv. I made a "swap file-a file-b" utility in the early 1990s. Needless to say, there was no system call for doing it atomically. I di

Re: stdbuf feature request - line buffering but for null-terminated data

2024-03-12 Thread Kaz Kylheku
On 2024-03-09 08:30, Zachary Santer wrote: > 'stdbuf --output=L' will line-buffer the command's output stream. > Pretty useful, but that's looking for newlines. Filenames should be > passed between utilities in a null-terminated fashion, because the > null byte is the only byte that can't appear wi

Re: stdbuf feature request - line buffering but for null-terminated data

2024-03-12 Thread Kaz Kylheku
On 2024-03-10 01:37, Pádraig Brady wrote: > On 09/03/2024 16:30, Zachary Santer wrote: >> 'stdbuf --output=L' will line-buffer the command's output stream. >> Pretty useful, but that's looking for newlines. Filenames should be >> passed between utilities in a null-terminated fashion, because the >>

Re: RFE: enable buffering on null-terminated data

2024-03-18 Thread Kaz Kylheku
On 2024-03-17 17:12, Zachary Santer wrote: > On Thu, Mar 14, 2024 at 11:14 AM Carl Edquist wrote: > >> Where things get sloppy is if you add some stuff in a pipeline after your >> build script, which results in things getting block-buffered along the >> way: >> >> $ ./build.sh | sed s/wha

Re: Symlink flag for chmod

2024-03-20 Thread Kaz Kylheku
On 2024-03-19 16:53, Pádraig Brady wrote: > but would appreciate a quick review of the fts_level usage in the second > patch. > > thanks, > Pádraig In utilities that perform tree walks, there may be reasons why not following links is a useful option, but it can't be relied on for security. Supp

Re: uniq for unsorted input

2024-03-26 Thread Kaz Kylheku
On 2024-03-26 09:40, Bruno Haible wrote: > Other methods described in [3], such as counters maintained in an 'awk' > or 'perl' process, or the 'unique' program that is part of the 'john' package > [4], can be ignored, because they need O(N) space and are thus not usable for > 40 GB large inputs [5

Re: coreutils-9.4.170-7b206 undefined behaviour in tests

2024-03-27 Thread Kaz Kylheku
On 2024-03-24 07:20, Bruno Haible wrote: > I have proposed a fix for this in > , > but Paul Eggert opposes it. I took a look. There are reasons not to like it. It introduces a PTR_ADD(p, x) abstraction which is only different f

Re: Feature Request: env -f to read from file

2024-03-28 Thread Kaz Kylheku
On 2024-03-28 15:29, Balakrishnan Balasubramanian wrote: > On 2024-03-28 3:38 p.m., Pádraig Brady wrote: >> Yes the feature has merit, and was previously discussed at: >> https://lists.gnu.org/archive/html/coreutils/2021-10/msg1.html >> There are some subtleties to consider though. > > Indeed

[PATCH] env: support encoding of args into command.

2017-05-25 Thread Kaz Kylheku
This is a new feature which allows the command argument of env to encode multiple extra arguments, as well as the relocation of the first trailing argument among those arguments. * src/env.c (usage): Mention the existence of the feature. (expand_command_notation): New function. (main): Detect whe

[PATCH] env: support encoding of args into command.

2017-05-25 Thread Kaz Kylheku
This is a new feature which allows the command argument of env to encode multiple extra arguments, as well as the relocation of the first trailing argument among those arguments. * src/env.c (usage): Mention the existence of the feature. (expand_command_notation): New function. (main): Detect whet

Re: Allow tail to display data after stream stops sending input after N seconds

2022-04-26 Thread Kaz Kylheku
On 2022-04-24 03:45, konsolebox wrote: > A command like this doesn't display data: > > tail -f /var/log/messages -n +1 | grep -e something --line-buffered | tail > > probably because the last tail waits for the pipe to terminate. Since the data comes from a file, you can use the watch utility f

Re: Allow tail to display data after stream stops sending input after N seconds

2022-04-27 Thread Kaz Kylheku
On 2022-04-24 03:45, konsolebox wrote: > A command like this doesn't display data: > > tail -f /var/log/messages -n +1 | grep -e something --line-buffered | tail > > probably because the last tail waits for the pipe to terminate. > > But this could work if there exists an option like -S which a

Re: [PATCH 1/2] factor: add option for printing in x^y format

2022-04-28 Thread Kaz Kylheku
On 2022-04-27 10:21, Bernhard Voelker wrote: > Regarding the postprocess solution: > this is a little awk(1) snippet to get the same output as with the patch: > > $ factor 13 36 | tr ' ' '\n' | uniq -c | awk '\ > BEGIN { n="" } > /:$/ { printf("%s%s", n, $2); n="\n"; next }; >

Re: date command is great but could use improvements

2022-07-03 Thread Kaz Kylheku
On 2022-07-03 04:09, David Chmelik wrote: >> (And, no, 1900 was not the zeroth year of the 20th century.  It was the >> 100th year of the 19th century!) > Most people say first of 20th century; I don't think anyone says 'one to 10 > are ones; 11 is first of the tens,' rather than zero or one to n

Re: csplit reports No space left on device

2022-08-17 Thread Kaz Kylheku
On 2022-08-17 14:19, Pádraig Brady wrote: > system you use, or how much space is free. > > I would run csplit with --keep-files, to see how many files were created, > how much space is free, and whether one can create any more files > in the directory using other means. I'd also try to capture at

Re: Inconsistent behavior of core utilities

2022-09-02 Thread Kaz Kylheku
On 2022-08-22 15:01, Dave Close wrote: > But if I try to simplify that command by inserting the output of the > ls command above, it doesn't work. > > $ grep CALL $( ls --quoting-style=shell-escape-always ? ) > grep: '#': No such file or directory > grep: "'": No such file or directory > g

Re: [PATCH] doc: printf: make "java" encoding example more standard

2022-10-28 Thread Kaz Kylheku
On 2022-10-28 06:54, Pádraig Brady wrote: > Note using iconv(1) rather than recode(1) is not appropriate > for this example, as the required functionality is only > available on libiconv's iconv implementation, which is > not installed on most systems. Note that there is an iconv in POSIX; recode

Re: [PATCH] yes: Remove memory leak on buf memory

2022-11-18 Thread Kaz Kylheku
On 2022-11-17 14:21, Alireza Arzehgar wrote: > From a4edebe5bafb8bf789cf5e9c807375c9bcdfab4e Mon Sep 17 00:00:00 2001 > From: alireza > Date: Fri, 18 Nov 2022 01:33:10 +0330 > Subject: [PATCH] yes: Remove memory leak on buf memory I don't agree with the patch. There is no real leak here; there is

Re: [PATCH] refactoring: yes: Remove unused and complex condition

2022-11-25 Thread Kaz Kylheku
On 2022-11-20 23:04, Alireza Arzehgar wrote: > Pádraig Brady writes: > >> Right that is usually the case. >> That check it to ensure the argv operands >> are laid out appropriately in memory, >> and is best to keep to handle esoteric systems >> where that might not be the case. > Thanks for your

Re: [PATCH] refactoring: users: Remove useless `trimmed_name` variable

2022-11-25 Thread Kaz Kylheku
On 2022-11-21 14:37, Alireza Arzehgar wrote: > Dear All, > > When I was reading users.c source code, on the `list_entries_users` > function, I saw that some codes can be removed and we can refactor this > codes to simpler and better code. > > I think this code is useless: > >if (IS_USER

Re: first contribution: smart rename for the mv command

2023-01-13 Thread Kaz Kylheku
On 2022-12-22 07:59, Stéphane Archer wrote: > Dear Gnu Coreutils community, > > I would like to contribute to the project a feature I miss a lot in the > `mv` command. > I currently have a working patch but it's clearly not perfect. I would like > to have feedback on it and would like to know if y

Re: Feature Request: Removal of '-f' Short Option in 'rm' Command

2023-09-28 Thread Kaz Kylheku
On 2023-09-24 23:12, Owen Chia wrote: > Specifically, I would like to suggest the removal > of the '-f' short option, while retaining > the '--force' long option. What are you going to do to fix the three billion, two-hundred and thirty-seven million, seven-hundred and fifty-six thousand, nine-hun

Re: man pages & info prefer HTML format

2023-09-28 Thread Kaz Kylheku
On 2023-09-24 05:37, Dennis German wrote: > After the  years and fine tuning of basic HTML, why > aren't the man pages standardized to HTML format? The official documentation for GNU Coreutils is the texinfo pages, not man pages. Info renders to HTML. The HTML doc for GNU Coreutils is hosted here

Re: behavioral change in coreutils `pwd` handling '//' (double slash) caused by gnulib update

2025-01-06 Thread Kaz Kylheku
On 2024-12-31 10:40, Bruno Haible via GNU coreutils General Discussion worote: > Zach van Rijn wrote in > : >> I am investigating a possible regression in gnulib that manifests >> as a behavioral change in coreutils `pwd` on some

Re: Adding a flag to cat for O_NOFOLLOW

2025-03-28 Thread Kaz Kylheku
On 2025-03-25 07:19, Ethan Heilman wrote: > Without this functionality in cat, users are likely to do the next > easiest option which is to use two separate commands to first check if > the file is a symlink and then read the file. This can be a source of > bugs and harm security because using two

[PATCH] env: support encoding of args into command.

2017-05-25 Thread Kaz Kylheku (Coreutils)
This is a new feature which allows the command argument of env to encode multiple extra arguments, as well as the relocation of the first trailing argument among those arguments. * src/env.c (usage): Mention the existence of the feature. (expand_command_notation): New function. (main): Detect whe

Re: [PATCH] env: support encoding of args into command.

2017-05-25 Thread Kaz Kylheku (Coreutils)
On 24.05.2017 18:10, Kaz Kylheku (Coreutils) wrote: This is a new feature which allows the command argument of env to encode multiple extra arguments, as well as the relocation of the first trailing argument among those arguments. Looks like my MUA screwed this up with "format=flowed

Re: [PATCH] env: support encoding of args into command.

2017-05-27 Thread Kaz Kylheku (Coreutils)
On 27.05.2017 08:06, Pádraig Brady wrote: Now the FreeBSD env(1) command supports the -S option to do splitting much as you've proposed, so I see no need to be different. Could you adjust the patch accordingly? I think it's probably best to avoid copying FreeBSD here. They have created a mess

Re: [PATCH] env: support encoding of args into command.

2017-05-29 Thread Kaz Kylheku (Coreutils)
On 29.05.2017 04:29, Eric Blake wrote: On 05/27/2017 07:30 PM, Kaz Kylheku (Coreutils) wrote: Bascially I'm completely against almost every aspect of this -S design; and I suspect the POSIX standardization people (Austion Group) won't adopt it, either, so it will forever remain just

Re: null separated ls output option

2017-06-28 Thread Kaz Kylheku (Coreutils)
On 28.06.2017 06:53, ra...@openmailbox.org wrote: On 2017-06-01 04:45, Pádraig Brady wrote: On 31/05/17 15:24, ra...@openmailbox.org wrote: Existing tools like find(1) were thought sufficient but find does not support sorting by date which ls does. I hope this patch can be reconsidered for in

Re: null separated ls output option

2017-06-29 Thread Kaz Kylheku (Coreutils)
On 28.06.2017 23:31, Bernhard Voelker wrote: [adding findutils] First of all, find(1) is maintained in the GNU findutils project, not in GNU coreutils. Redirected from: http://lists.gnu.org/archive/html/coreutils/2017-06/msg00049.html On 06/28/2017 07:13 PM, Kaz Kylheku (Coreutils) wrote

Re: Determination of file lists from selected folders without returning directory names

2017-07-17 Thread Kaz Kylheku (Coreutils)
On 17.07.2017 10:25, SF Markus Elfring wrote: Hello, The tool “ls” supports the filtering of directory contents. No, it actually doesn't. In a shell command like ls *.txt it is actually the shell which performs the *.txt filename expansion, before the ls program is executed. That program r

Re: Determination of file lists from selected folders without returning directory names

2017-07-17 Thread Kaz Kylheku (Coreutils)
On 17.07.2017 12:37, SF Markus Elfring wrote: A corresponding result could be achieved by using a subshell (which I would like to avoid for this use case) for a command like “(cd ${my_dir} && ls *txt)”. If you want to capture these strings into a variable, you can't really avoid a sub-process.

Re: Determination of file lists from selected folders without returning directory names

2017-07-18 Thread Kaz Kylheku (Coreutils)
On 18.07.2017 01:17, SF Markus Elfring wrote: I imagine that there are more advanced possibilities to improve the software run time characteristics for this use case. Well, if it has to be fast, perhaps don't write the code in the shell language. To which “shell” would you like to refer to?

Re: coreutils feature requests?

2017-07-18 Thread Kaz Kylheku (Coreutils)
On 18.07.2017 15:44, Lance E Sloan wrote: Hi, all. Aside from a bug report, is there a way to submit a feature request for coreutils? I have a couple of requests in mind, which I don't think qualify as bugs: 1. Add a feature to "cut" that allows selected fields to be output in a different orde

RE: coreutils feature requests?

2017-07-19 Thread Kaz Kylheku (Coreutils)
On 19.07.2017 06:29, Nellis, Kenneth wrote: From: Steeve McCauley I can't believe I'd never thought of reordering output columns like this.  FWIW, I agree that another option should be used to prevent issues with backward compatibility. $ echo 1,2,3,4,5,6 | cut -d, -f3,5,2 2,3,5 $ echo 1,2,3

Re: coreutils feature requests?

2017-07-19 Thread Kaz Kylheku (Coreutils)
On 19.07.2017 10:03, Lance E Sloan wrote: With regard to your objection to a special environment variable: I agree. I didn't feel strongly about it at first, but I was leaning towards not implementing env. var. support for this. It just didn't feel right. I have written programs that use env.

Re: coreutils feature requests?

2017-07-19 Thread Kaz Kylheku (Coreutils)
On 19.07.2017 10:30, Eric Blake wrote: On 07/19/2017 12:03 PM, Lance E Sloan wrote: Hi, Eric. Thank you for the thoughtful response. I regret that I have trouble understanding your point of view, though. Please know that I do not mean any disrespect. I'd appreciate it if you could explain w

Re: How the ls command interpret this?

2017-07-30 Thread Kaz Kylheku (Coreutils)
On 30.07.2017 13:46, Reuti wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Is that necessary? What's the use of reducing your plausible deniability of rubbish postings? Am 03.07.2017 um 20:30 schrieb BaBa: Le 2017-07-03 19:17, Eric Blake a écrit : Case 3: $ mkdir foo $ cd foo $ tou

Re: sort -V behaviour

2017-07-31 Thread Kaz Kylheku (Coreutils)
On 31.07.2017 09:23, Sven C. Dack wrote: Hello, I have a question about the -V option to sort, but first some examples: $ echo -e "1\n1.2\n1.2.3\n1.2.3.4"|sort -V 1 1.2 1.2.3 1.2.3.4 $ echo -e "f1\nf1.2\nf1.2.3\nf1.2.3.4"|sort -V f1 f1.2 f1.2.3 f1.2.3.4 $ echo -e "/1\n/1.2\n/1.2.3\n/1.2.3.4"|

Re: New utility suggestion: chdir(1)

2017-08-26 Thread Kaz Kylheku (Coreutils)
On 26.08.2017 11:10, Colin Watson wrote: sudo chroot /path/to/chroot sh -c 'cd /foo && ls -l' The -c option is not the only way to pass a script to the shell. You can also pipe it in. This means dealing with shell quoting, which is tedious and error-prone. sh <<'end' echo 'hello, w

Re: New utility suggestion: chdir(1)

2017-08-27 Thread Kaz Kylheku (Coreutils)
On 26.08.2017 11:10, Colin Watson wrote: I would like there to be an adverbial version of "cd", which takes a path followed by a command and optional arguments and executes the command with its working directory set to the given path. Its invocation would be similar to chroot(8), that is: chd

RE: How to submit my utility for inclusion in coreutils?

2017-09-14 Thread Kaz Kylheku (Coreutils)
On 02.09.2017 07:29, Quiroz, Hector wrote: Thanks for your reply. I will write it in c then I will ask again. Thanks You would be doing something pretty silly: taking a working Perl script which performs adequately and rewriting it in C just so that it can potentially be included in some projec

Re: cp, ln, mv, install: check for vulnerable target directories

2017-09-20 Thread Kaz Kylheku (Coreutils)
On 19.09.2017 00:25, Paul Eggert wrote: For years cp and friends have been subject to a symlink attack, in that seemingly-ordinary commands like 'cp a b' can overwrite arbitrary directories that the user has access to, if b's parent directory is world-writable and is not sticky and is manipulated

Re: cp, ln, mv, install: check for vulnerable target directories

2017-09-20 Thread Kaz Kylheku (Coreutils)
On 19.09.2017 00:25, Paul Eggert wrote: For years cp and friends have been subject to a symlink attack, in that seemingly-ordinary commands like 'cp a b' can overwrite arbitrary directories that the user has access to, if b's parent directory is world-writable and is not sticky and is manipulated

Re: cp, ln, mv, install: check for vulnerable target directories

2017-09-21 Thread Kaz Kylheku (Coreutils)
On 20.09.2017 18:59, Paul Eggert wrote: Kaz Kylheku (Coreutils) wrote: Instead of checking for what *could* go wrong, why not defend more specifically against signs that the attack might be actually happening. That's what the patch is trying to do, though it looks like it should be imp

Re: cp, ln, mv, install: check for vulnerable target directories

2017-09-21 Thread Kaz Kylheku (Coreutils)
On 21.09.2017 09:18, Kaz Kylheku (Coreutils) wrote: On 20.09.2017 18:59, Paul Eggert wrote: Kaz Kylheku (Coreutils) wrote: Instead of checking for what *could* go wrong, why not defend more specifically against signs that the attack might be actually happening. That's what the pat

Re: cp, ln, mv, install: check for vulnerable target directories

2017-09-21 Thread Kaz Kylheku (Coreutils)
On 21.09.2017 11:03, Kaz Kylheku (Coreutils) wrote: On 21.09.2017 09:18, Kaz Kylheku (Coreutils) wrote: On 20.09.2017 18:59, Paul Eggert wrote: Kaz Kylheku (Coreutils) wrote: Instead of checking for what *could* go wrong, why not defend more specifically against signs that the attack might

Re: Would a patch adding color to cat(1) be accepted?

2017-10-10 Thread Kaz Kylheku (Coreutils)
On 10.10.2017 07:03, Leslie S Satenstein wrote: My RESPONSE KISS Hey, why not? Next year, everyone's embedded system will have twice the flash. Then they can stop using BusyBox and switch to Coreutils with colorized everything!

Re: Why is `find -name '*.txt'` much slower than '*.txt' on glusterfs?

2018-01-23 Thread Kaz Kylheku (Coreutils)
On 2018-01-19 20:26, Peng Yu wrote: Hi, There are ~7000 .txt files in a directory on glusterfs. Here are the run time of the following two commands. Does anybody know why the find command is much slower than *.txt. Is there a way to change the api that `find` uses to search files so that it can

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

2018-02-05 Thread Kaz Kylheku (Coreutils)
On 2018-02-05 07:18, Андрей Кинзлер wrote: Hi,  After upgrading my distro, I was quite surprised when I saw some of my files wrapped with single quotes. Why adding such a useless feature of an unnecessary garbage to the terminal output? Were you inspired by Microsoft when fixing something that w

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

2018-02-06 Thread Kaz Kylheku (Coreutils)
On 2018-02-06 01:30, Michael wrote: On 06/02/2018 08:13, Bernhard Voelker wrote: On 02/06/2018 12:41 AM, Michael Felt wrote: imho, the main problem is you change the default behavior, and 43 years of programs are broken. no, as explained it does not affect programs and scripts, because this

Re: Multibyte support for sort, uniq, join, tr, cut, paste, expand, unexpand, fmt, fold, and pr

2018-03-27 Thread Kaz Kylheku (Coreutils)
On 2018-03-20 15:18, Assaf Gordon wrote: Two things for later (not critical for now): to make review easier, it's recommended to combine all commits that relate to a single program into one commit. This is called "squash" in git (see: http://gitready.com/advanced/2009/02/10/squashing-commits-with

Re: env: add -S option (split string for shebang lines in scripts)

2018-04-25 Thread Kaz Kylheku (Coreutils)
On 2018-04-24 22:09, Pádraig Brady wrote: I was thinking that the explanation of -S in usage() would say something like: -S, --split-string=S process and split S into separate arguments used to pass multiple arguments on shebang lines One little problem with this

Re: Difference in binaries present in old and new versions of gnu tools

2018-05-03 Thread Kaz Kylheku (Coreutils)
On 2018-05-02 23:23, Mathai, Eldho (Nokia - IN/Bangalore) wrote: After the make install we could see many binaries are missing in the latest when compared with our existing old version. Can you help me here to know why these binaries are missing and where can I get the latest versions of these mi

Re: is there a real escape "quoting" style for ls?

2018-05-15 Thread Kaz Kylheku (Coreutils)
On 2018-05-13 09:30, Harald Dunkel wrote: On 5/13/18 1:08 PM, L A Walsh wrote: If you look under --quoting-style, you'll see:  --quoting-style=WORD   use quoting style WORD for entry names:     literal, locale, shell, shell-always,     shell-escape, shell

Re: performance bug of `wc -m`

2018-05-17 Thread Kaz Kylheku (Coreutils)
On 2018-05-16 17:13, Eric Fischer wrote: I also found wcwidth to be a bad performance bottleneck in my multibyte branch of coreutils. To fix the problem in my branch, I added a cache of the widths returned for characters in the range from 0 to UCHAR_MAX (which perhaps should also be widened to

Re: performance bug of `wc -m`

2018-05-17 Thread Kaz Kylheku (Coreutils)
On 2018-05-13 15:05, Philip Rowlands wrote: In the slow case, wc is spending most of its time in iswprint / wcwidth / iswspace. Perhaps wc could learn a faster method of counting utf-8 (https://stackoverflow.com/a/7298149); this may be worthwhile as the trend to utf-8 everywhere marches on. I ca

Re: performance bug of `wc -m`

2018-05-24 Thread Kaz Kylheku (Coreutils)
On 2018-05-20 16:43, Bruno Haible wrote: Kaz Kylheku wrote in https://lists.gnu.org/archive/html/coreutils/2018-05/msg00036.html : In what situation are there printable characters in the range [0, UCHAR_MAX) that have a width > 1? That's the wrong question. The question is which ch

Re: mv --recursive

2018-06-01 Thread Kaz Kylheku (Coreutils)
On 2018-06-01 04:08, Grady Martin wrote: Hello. I have two questions: · Is there a way to recursively merge two directories with move (not copy/delete) operations, using standard GNU utilities? · If not, how do coreutils' maintainers feel about an -r/-R/--recursive patch for mv? We can almost

Re: RFC: rm --preserve-root=all to protect mount points

2018-06-11 Thread Kaz Kylheku (Coreutils)
On 2018-06-10 23:14, Pádraig Brady wrote: I was asked off list to consider adding an option to rm that could be enabled with an alias, and would protect mount points specified on the command line. [...] $ rm -r --preserve-root=all /dev/shm rm: skipping '/dev/shm', since it's a mount point

Re: FAQ confusing terminology regarding GNU and Linux Relationship

2018-10-17 Thread Kaz Kylheku (Coreutils)
On 2018-10-16 18:58, fdvwc4+ekdk64wrie5d8rnqd9...@guerrillamail.com wrote: Under the section in the FAQ about uname, it refers to ``the Linux kernel." Is not the GNU position that Linux should be referred to as ``Linux, the kernel' or something similar? The GNU position is that an operating sys

Re: [PATCH] df: Adding a --no-headers option, by request of Bruce Dubbs

2019-03-20 Thread Kaz Kylheku (Coreutils)
On 2019-03-17 05:27, Ed Neville wrote: Taking suggestions into account, '--no-headers' seems more consistent with ps options. This loses on character count: df --no-headers df | sed 1d Fully golfed: df|sed 1d Oops!

Re: Possible ls bug?

2019-03-20 Thread Kaz Kylheku (Coreutils)
On 2019-02-26 13:10, Bartells, Paul wrote: I have encountered behavior with ls -R that appears to be incongruous. My actual command line entry is: ls -alR /kyc_mis/dev/*/*/paul/* > pauldev.lst. [ ... ] /kyc_mis/dev/rpts/paul/kyc: total 599 -rwxrwx--- 1 pb82477 kycmis 262144 Oct 31 17:06 kyc_

Re: How to convert a md5sum back to a timestamp?

2019-08-01 Thread Kaz Kylheku (Coreutils)
On 2019-07-31 20:36, Peng Yu wrote: Hi, Suppose that I know a md5sum that is derived one of the timestamps computed below. Is there a way to quickly derive what the original timestamp is? I could make a database of all the timestamps and their md5sums. But as the total number of entries increase

Re: /bin/echo -- $var

2019-08-14 Thread Kaz Kylheku (Coreutils)
On 2019-08-14 05:01, Harald Dunkel wrote: Hi folks, I just learned by accident that var="-n" /bin/echo -- $var actually prints -- -n Shouldn't it be just -n ? According to POSIX, echo doesn't take options. It is specified that "Implementations shall not sup

Re: /bin/echo -- $var

2019-08-15 Thread Kaz Kylheku (Coreutils)
On 2019-08-15 00:53, Harald Dunkel wrote: IMHO they should have kept the "no args allowed" for echo ("in the late 70s") and should have introduced a new tool "eecho" instead. Well, new tool for printing was introduced under the name "printf".

Re: Wishing rmdir had a prompt

2019-09-01 Thread Kaz Kylheku (Coreutils)
On 2019-09-01 17:50, Leslie S Satenstein via GNU coreutils General Discussion wrote: rmdir -i I don't see this in a fairly recent GNU Coreutils 8.28 installation. Must be very new? There is some justification for such a thing. Though it may seem that accidental deletion of empty directories

Re: Wishing rmdir had a prompt

2019-09-02 Thread Kaz Kylheku (Coreutils)
On 2019-09-02 01:03, Sami Kerola wrote: I am not a maintainer, but I don't see any problem adding --interactive long only option. Getting a short option may clash with future posix requirement, so I believe they are not handed out without really good reasons. Fear not; POSIX standardization i

Re: [PATCH] chown: prevent multiple --from options

2019-09-29 Thread Kaz Kylheku (Coreutils)
On 2019-09-29 02:46, Francois wrote: We can fix by rejecting the cases where --from option is provided multiple times and uid or gid are set twice. An more sophisticated fix is to allow the --from to be given multiple times, but have the resulting range be the intersection of all of the range

Re: Can natural sort support be added?

2019-10-08 Thread Kaz Kylheku (Coreutils)
On 2019-10-08 00:47, Peng Yu wrote: Hi, Since natural sort is provided in a few languages (as mentioned in the Wikipedia page). Can it be supported by `sort` besides just version-sort? https://en.wikipedia.org/wiki/Natural_sort_order This page has no precise specific definition of natural sor

Re: md5sum and recursive traversal of dirs

2019-10-10 Thread Kaz Kylheku (Coreutils)
On 2019-10-10 10:29, Сергей Кузнецов wrote: Hello, I find it strange that md5sum does not yet support recursive directory traversal. I moved part of the code from ls and added this functionality. How about adding this? I also added sha3 and md6 algorithms, they are in "gl/lib/". If we have an

Re: Compile Coreutils without xattr but i installed

2019-10-10 Thread Kaz Kylheku (Coreutils)
On 2019-10-10 11:56, Wei MA wrote: I compile the source code. And when i ran tests/cp/capabiliy.sh, cp preserves attr failed without xattr support . Then i installed xattr. I deleted coreutils and downloaded it again. The problem still exists. A configure problem likely won't be due to a bad

Re: Does head util cause SIGPIPE?

2019-10-25 Thread Kaz Kylheku (Coreutils)
On 2019-10-25 00:56, Ray Satiro wrote: Recently I tracked down a delay in some scripts to this line: find / -name filename* 2>/dev/null | head -n 1 (Here 'filename*' should be quoted, because we want find to process the pattern, not for the shell to try to expand it.) Interestingly, POSIX neg

Re: How to implement the V comparsion used by sort in python?

2019-10-27 Thread Kaz Kylheku (Coreutils)
On 2019-10-26 16:05, Peng Yu wrote: Are you sure they are 100% compatible with V? I don’t want to use them just later find they are not 100% compatible. "are you sure various Python packages are compatible with sommething vaguely described in a some years-old obscure blog post" doesn't seem li

Re: feature request du/find

2019-10-31 Thread Kaz Kylheku (Coreutils)
On 2019-10-30 13:14, Benjamin Arnold wrote: Hi, thanks a lot for your quick response. Sorry, i must have missed the -links option, that's exactly what i am looking for. Unfortunately, it's a component in an incorrect solution. A file tree being backed up can contain hard links (e.g. two execu

Re: question about SI/IEC in df

2019-11-28 Thread Kaz Kylheku (Coreutils)
On 2019-11-28 04:39, Krzysztof Labus wrote: In the manual I see: The SIZE argument is an integer and optional unit (example: 10K is 10*1024). Units are K,M,G,T,P,E,Z,Y (powers of 1024) or KB,MB,... (powers of 1000). 1. Why df not using Ki, Mi, Gi etc. in powers od 1024 ?? - Wastes space. - Fl

Re: question about SI/IEC in df

2019-11-28 Thread Kaz Kylheku (Coreutils)
On 2019-11-28 10:16, Kaz Kylheku (Coreutils) wrote: But, let me remark, using KB, MB, for powers of 1000 is neither metric, nor grounded in tradition. If it's all caps like KB and MB, it's clearly 1024-based just like without the B. There has to be a Sorry about that, this is fl

Re: [PATCH] sleep: allow ms suffix for milliseconds

2019-11-29 Thread Kaz Kylheku (Coreutils)
On 2019-11-29 05:30, Rasmus Villemoes wrote: * src/sleep.c: Accept ms suffix. * doc/coreutils.texi (sleep invocation): Document it. When one wants to sleep for some number of milliseconds, one can do (at least in bash) sleep $(printf '%d.%03d' $((x/1000)) $((x%1000))) but that's a bit cumber

Re: [PATCH] sleep: allow ms suffix for milliseconds

2019-11-29 Thread Kaz Kylheku (Coreutils)
On 2019-11-29 09:38, Bernhard Voelker wrote: On 2019-11-29 14:30, Rasmus Villemoes wrote: When one wants to sleep for some number of milliseconds, one can do (at least in bash) sleep $(printf '%d.%03d' $((x/1000)) $((x%1000))) but that's a bit cumbersome. Why not use floating-point numbers

Re: [PATCH] sleep: allow ms suffix for milliseconds

2019-12-09 Thread Kaz Kylheku (Coreutils)
On 2019-12-08 21:46, sunnycemet...@gmail.com wrote: On 2019-12-02 13:58, Stephane Chazelas wrote: With GNU coreutils sleep (and ksh93's builtin but not that of bash or mksh) one can add a e-3 suffix to get miliseconds (and e-6 for us and e-9 for ns) sleep 1 # s sleep 1000e-3 # ms sleep 100e

Re: Regarding compilation of coreutils.

2020-01-06 Thread Kaz Kylheku (Coreutils)
On 2020-01-06 11:53, Sandeep Kumar Sah wrote: previously i edited ls.c to print "Hello World" before listing content in a directory. Now i have deleted the coreutils folder and everything underneath it. I want to get the original version of ls command for which i am unable to build the source

Re: Is it safe to replace dd?

2020-01-20 Thread Kaz Kylheku (Coreutils)
On 2020-01-20 04:14, microsoft gaofei wrote: Many people suggest using dd to create bootable USB, https://www.archlinux.org/download/ . But cp and mv also writes to USB, e.g., cp archlinux-2020.01.01-x86_64.iso /dev/sdb, cat archlinux-2020.01.01-x86_64.iso > /dev/sdb. Is it safe to use these comm

Re: What is the difference between unlink and rm -f?

2020-01-29 Thread Kaz Kylheku (Coreutils)
On 2020-01-29 01:45, Peng Yu wrote: Hi, It seems to me unlink and rm -f are the same if the goal is the delete files. When are they different? Thanks. I answered this on Unix Stackexchange in 2016: https://unix.stackexchange.com/a/326711/16369 :)

Re: gcc10's -Wreturn-local-addr gives FP warning about lib/careadlinkat

2020-02-06 Thread Kaz Kylheku (Coreutils)
On 2020-02-05 16:27, Jim Meyering wrote: Building latest latest coreutils using latest-from-git gcc10 evokes this false positive: lib/careadlinkat.c: In function 'careadlinkat': cc1: error: function may return address of local variable [-Werror=return-local-addr] lib/careadlinkat.c:73:8: note: d

Re: gcc10's -Wreturn-local-addr gives FP warning about lib/careadlinkat

2020-02-06 Thread Kaz Kylheku (Coreutils)
On 2020-02-06 09:05, Jim Meyering wrote: On Thu, Feb 6, 2020 at 6:03 AM Pádraig Brady wrote: On 06/02/2020 00:27, Jim Meyering wrote: > Building latest latest coreutils using latest-from-git gcc10 evokes > this false positive: > > lib/careadlinkat.c: In function 'careadlinkat': > cc1: error: fu

Re: BUG in sort --numeric-sort --unique

2020-02-13 Thread Kaz Kylheku (Coreutils)
On 2020-02-13 14:00, Stefano Pederzani wrote: In fact, separating the parameters: # cat controllareARCHIVIO_2020/02/controllare20200213.txt | sort -u | sort -n | wc -l 1262 we workaround the bug. My own experiment shows confirms things to be reasonable. When -n and -u are combined, then unique

Re: ls feature request

2020-02-20 Thread Kaz Kylheku (Coreutils)
On 2020-02-20 16:01, Riccardo Mazzarini wrote: The ls programs currently provides a "--group-directories-first" option, to group directories before files. I'd be nice to have the opposite option, "--group-directories-last" or "--group-files-first", to group files before directories. Workarou

Re: ls feature request

2020-02-21 Thread Kaz Kylheku (Coreutils)
On 2020-02-21 10:32, Riccardo Mazzarini wrote: Hi Kaz, this works almost perfectly but it fails with filenames that contain spaces. I tried using quotation marks, i.e. ls -dU "$(find .* * -maxdepth 0 -not -type d | sort ; find .* * -maxdepth 0 -type d | sort)" but that didn't work. Any ideas

Re: RFC: du reports a 1.2PB file on a 1TB btrfs disk

2020-03-10 Thread Kaz Kylheku (Coreutils)
On 2020-03-10 11:52, Jim Meyering wrote: Otherwise, du provides no way of seeing how much of the actual disk space is being used by such FS-compressed files. If you stat the file, what are the values of st_size, st_blksize and st_blocks?

Re: RFC: du reports a 1.2PB file on a 1TB btrfs disk

2020-03-11 Thread Kaz Kylheku (Coreutils)
On 2020-03-10 21:31, Jim Meyering wrote: On Tue, Mar 10, 2020 at 12:24 PM Kaz Kylheku (Coreutils) <962-396-1...@kylheku.com> wrote: On 2020-03-10 11:52, Jim Meyering wrote: > Otherwise, du provides no way of seeing how much of the actual disk > space is being used by such FS-comp

Re: altchars for base64

2020-03-14 Thread Kaz Kylheku (Coreutils)
On 2020-03-14 22:20, Peng Yu wrote: Hi, Python base64 decoder has the altchars option. https://docs.python.org/3/library/base64.html base64.b64decode(s, altchars=None, validate=False)¶ But I don't see such an option in coreutils' base64. Can this option be added? Thanks. # use %* instead of

  1   2   >