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

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

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

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.

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

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: 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

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

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

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 >

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

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: '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 seque

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 scramb

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: 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

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

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,

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

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

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] 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

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: 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 >

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

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

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: 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

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

Re: thoughts on NO_COLOR

2022-02-28 Thread Kaz Kylheku (Coreutils)
On 2022-02-27 12:37, Pádraig Brady wrote: I just noticed some de facto treatment of the NO_COLOR env var. https://no-color.org/ These people are not system implementors; they should not be proposing variables in a POSIX-reserved namespace. The website provides no contact links whatsoever;

Re: how to speed up sort for partially sorted input?

2021-08-12 Thread Kaz Kylheku (Coreutils)
On 2021-08-11 11:58, Peng Yu wrote: On Wed, Aug 11, 2021 at 1:43 PM Kaz Kylheku (Coreutils) <962-396-1...@kylheku.com> wrote: On 2021-08-11 05:03, Peng Yu wrote: > On Wed, Aug 11, 2021 at 5:29 AM Carl Edquist > wrote: >> (With just a bit more work, you can do all your s

Re: how to speed up sort for partially sorted input?

2021-08-11 Thread Kaz Kylheku (Coreutils)
On 2021-08-11 05:03, Peng Yu wrote: On Wed, Aug 11, 2021 at 5:29 AM Carl Edquist wrote: (With just a bit more work, you can do all your sorting in a single awk process too (without piping out to sort), but i think you'll still be disappointed with the performance compared to a single sort

Re: how to speed up sort for partially sorted input?

2021-08-10 Thread Kaz Kylheku (Coreutils)
On 2021-08-10 22:06, Kaz Kylheku (Coreutils) wrote: On 2021-08-07 17:46, Peng Yu wrote: Hi, Suppose that I want to sort an input by column 1 and column 2 (column 1 is of a higher priority than column 2). The input is already sorted by column1. Is there a way to speed up the sort (compared

Re: how to speed up sort for partially sorted input?

2021-08-10 Thread Kaz Kylheku (Coreutils)
On 2021-08-07 17:46, Peng Yu wrote: Hi, Suppose that I want to sort an input by column 1 and column 2 (column 1 is of a higher priority than column 2). The input is already sorted by column1. Is there a way to speed up the sort (compared with not knowing column 1 is already sorted)? Thanks.

Re: Suggest on "ln"

2021-07-19 Thread Kaz Kylheku (Coreutils)
On 2021-07-19 00:50, Patrick Reader wrote: On 19/07/2021 08:48, Kamil Dudka wrote: On Monday, July 19, 2021 2:29:18 AM CEST James Lu wrote: "ln" should write a warning to stderr if the source file doesn't exist. ln writes an error message to stderr if the source file does not exist: $ mkdir

Re: [PATCH] copy: disallow copy_file_range() on Linux kernels before 5.3

2021-05-18 Thread Kaz Kylheku (Coreutils)
On 2021-05-12 16:09, Pádraig Brady wrote: copy_file_range() before Linux kernel release 5.3 had many issues, Remark: although there is nothing wrong with the patch, and it is necessary, this seems like an issue for the C library to handle, as well. - The GNU C library provides the function

Re: [PATCH] ls: add --sort=width (-W) option to sort by filename width

2021-04-16 Thread Kaz Kylheku (Coreutils)
On 2021-04-09 15:51, Pádraig Brady wrote: On 09/04/2021 13:02, Carl Edquist wrote: Dear Coreutils Maintainers, I'd like to introduce my favorite 'ls' option, '-W', which I have been enjoying using regularly over the last few years. The concept is just to sort filenames by their printed

Re: version-sort ugliness or bugs

2021-04-16 Thread Kaz Kylheku (Coreutils)
On 2021-04-15 18:44, Erik Auerswald wrote: Hi, On Thu, Apr 15, 2021 at 11:47:34PM +0200, Vincent Lefevre wrote: I'm currently using version-sort in order to get integers sorted in strings (due to the lack of simple numeric sort like in zsh), but I've noticed some ugliness. This may be bugs,

Re: [PATCH] cksum: Use pclmul hardware instruction for CRC32 calculation

2021-03-14 Thread Kaz Kylheku (Coreutils)
On 2021-03-14 12:55, Jeffrey Walton wrote: The underlying problem is GCC, Clang and friends conflate the user's ISA with ISA the compiler uses. They are not the same - they are distinct. Unfortunately, GCC and Clang never addressed the underlying problem. Sorry, what does that mean? GCC works

Re: [PATCH] cksum: Use pclmul hardware instruction for CRC32 calculation

2021-03-12 Thread Kaz Kylheku (Coreutils)
On 2021-03-12 07:33, Kristoffer Brånemyr via GNU coreutils General Discussion wrote: Hi, I was just wondering if you are planning to merge the change, or if you decided against it? :)I wanted to use the cpuid.h autoconf detection for another patch I'm working on. Regarding the comment "Since

Re: Add dry-run option to mv

2021-03-10 Thread Kaz Kylheku (Coreutils)
On 2021-03-10 13:59, L A Walsh wrote: On 2021/03/07 03:20, Emilio Garcia wrote: Hi all, I checked out the coreutils repo on Github and I would like to ask you to add a dry-run option in the mv command. When I've needed such functionality, I insert an 'echo' before the

Re: Sorting SNMP numeric OID's?

2021-02-22 Thread Kaz Kylheku (Coreutils)
On 2021-02-22 07:31, Ed Fair via GNU coreutils General Discussion wrote: Has it ever been discussed to add an option to the sort utility for sorting numeric SNMP object identifiers by sub-identifier? Probably not, but what has been discussed is sorting version numbers like 1.2.3. How are

Re: chmod: man page clarification for letter X

2020-10-08 Thread Kaz Kylheku (Coreutils)
On 2020-10-08 10:28, Tomás Fernandes wrote: Hello, I've recently come across chmod's man page as someone who is not very experienced (1st year CS undergrad), and found that the definition of the letter X in the man page a bit unclear, more specifically this part (in bold): On the topic of

Re: chmod: man page clarification for letter X

2020-10-08 Thread Kaz Kylheku (Coreutils)
On 2020-10-08 10:28, Tomás Fernandes wrote: Hello, I've recently come across chmod's man page as someone who is not very experienced (1st year CS undergrad), and found that the definition of the letter X in the man page a bit unclear, more specifically this part (in bold): execute/search

Re: wc feature request

2020-10-06 Thread Kaz Kylheku (Coreutils)
On 2020-10-05 08:40, A B wrote: Many thanks for all the much needed contributions to society as a whole. I did have one feature to request for wc, which I think would be highly complementary to grep’s -q flag. It would be really cool if wc could have a -q flag as well, which could return

Re: What is the interpretation of bs of dd in terms of predicting the disk performance of other I/O bound programs?

2020-09-28 Thread Kaz Kylheku (Coreutils)
On 2020-09-23 09:56, Peng Yu wrote: Hi, Many people use dd to test disk performance. There is a key option dd, which I understand what it literally means. But it is not clear how there performance measured by dd using a specific bs maps to the disk performance of other I/O bound programs. Could

Re: date: unclosed date string comments

2020-08-06 Thread Kaz Kylheku (Coreutils)
On 2020-08-05 18:52, sunnycemet...@gmail.com wrote: Hello. Given this documentation: Comments may be introduced between round parentheses, as long as included parentheses are properly nested. Is this considered a bug: ■ LC_ALL=C date -d '(test 1 2 3' Wed Aug 5 00:00:00 EDT 2020 ■

Re: Enhancement Request for sha256sum - output only the SHA-256 hash alone

2020-07-19 Thread Kaz Kylheku (Coreutils)
On 2020-07-17 14:33, Pádraig Brady wrote: On 17/07/2020 15:21, jens.archlinux jens wrote: Hello, propose to add a new option for sha256sum to output only the SHA-256 hash alone, without a trailing file name and without a trailing newline. (This would make sense for one input file only). It

Re: mv w/mkdir -p of destination

2020-07-03 Thread Kaz Kylheku (Coreutils)
On 2020-07-03 14:38, Bernhard Voelker wrote: On 2020-05-11 05:16, Vito Caputo wrote: Does this already exist? Was just moving a .tgz into a deep path and realized I hadn't created it on that host, and lamented not knowing what convenient flag I could toss on the end of the typed command to

Re: Disable b2sum from coreutils?

2020-07-02 Thread Kaz Kylheku (Coreutils)
On 2020-07-01 22:18, Jeffrey Walton wrote: Hi Everyone, The BLAKE2 folks have optimized implementations for b2sum on i686, x86_64, NEON and PowerPC. It also has more options than the coreutils version. I'd like to disable b2sum in coreutils and use the BLAKE2 team's version. This is a job

Re: feature request: better intuitive syntax LINK=TARGET

2020-06-25 Thread Kaz Kylheku (Coreutils)
On 2020-06-24 19:35, Andrej Surkov wrote: Hi all! ln syntax is very uncertain - every time I use ln I'm confused what is correct "ln -s LINK TARGET" or "ln -s TARGET LINK"! Of cause I can check man ln or ln --help, but what if we add unambiguous syntax, for example ln -s

Re: [PATCH] md5sum: add an option to change directory

2020-05-20 Thread Kaz Kylheku (Coreutils)
On 2020-05-20 14:15, Bertrand Jacquin wrote: In the fashion of make and git, add the ability for all sum tools to change directory before reading a file. $ sha256sum /etc/fstab b5d6c0e5e6bc419b134478ad7b3e7c8cc628049876a7772cea469e81e4b0e0e5 /etc/fstab Make requires this option because

Re: suggestion: /etc/dd.conf

2020-04-29 Thread Kaz Kylheku (Coreutils)
On 2020-04-28 02:14, turgut kalfaoğlu wrote: I would like to suggest and in fact volunteer to create a conf file option to 'dd'. By doing that you're replacing function arguments with global variables, which is a bad idea. It has dozens of hard to remember options, and there are some that

Re: statically linking coreutils 8.32

2020-03-19 Thread Kaz Kylheku (Coreutils)
On 2020-03-19 01:54, Gabor Z. Papp wrote: lo lo, while trying to statically link coreutils 8.32 on linux x86_64, I'm getting the following error: Static linking has not been supported by Glibc for many years now; so you can at best get a program's own components to be static, but not down

Re: failing CI jobs

2020-03-18 Thread Kaz Kylheku (Coreutils)
On 2020-03-18 04:27, "Toni Uhlig (Smartphone)" via GNU coreutils General Discussion wrote: There are a lot of failing CI jobs and nobody seems to care about. Some of them seem to fail since two+ years ago. Why not disable them, if nobody cares about? Source:

Re: altchars for base64

2020-03-15 Thread Kaz Kylheku (Coreutils)
On 2020-03-15 09:00, Assaf Gordon wrote: Hello, On 2020-03-15 12:12 a.m., Kaz Kylheku (Coreutils) wrote: On 2020-03-14 22:20, Peng Yu wrote: Python base64 decoder has the altchars option. [...] But I don't see such an option in coreutils' base64. Can this option be added? Thanks. # use

Re: altchars for base64

2020-03-15 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

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: 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: 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

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.

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

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:

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:

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: 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

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: [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

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

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 flatly wrong

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. -

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

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

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

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: 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

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

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

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

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

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: /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

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

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

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: 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

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: 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

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 charact

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

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: 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,

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

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

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:

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: 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:

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,

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 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   >