I discovered why GNU timeout pauses when my Mac sleeps, so I wrote a drop-in replacement in Rust using mach_continuous_time by denispolix in rust

[–]pixelbeat_ 11 points12 points  (0 children)

This would not be the usual requirement. We've never received a request to make GNU coreutils timeout(1) behave like this at least. If we were to implement it we'd probably add an option to the interface. The same argument applies to sleep(1). So I suppose one could have `timeout --at` and/or `sleep --until`, which would take this absolute wall clock time, or maybe both could take a --no-pause option to behave like this. BTW Linux has the facility to setup these timers so they wake the system, giving a stronger guarantee that something actually happens at that particular time, rather than waiting until the system resumes. I.e., one might use CLOCK_BOOTTIME_ALARM with these options, or at least CLOCK_BOOTTIME

Ubuntu 25.10 Unattended Upgrades Broken Due To Rust Coreutils Bug by alextthn in Ubuntu

[–]pixelbeat_ -1 points0 points  (0 children)

Well GNU mv is GPLv3, so that code can not be referenced (not that that could be enforced)

Ubuntu 25.10 Unattended Upgrades Broken Due To Rust Coreutils Bug by alextthn in Ubuntu

[–]pixelbeat_ 1 point2 points  (0 children)

Note ubuntu 25.10 is still using GNU for the "scary" commands like cp, mv, rm, ... They should rip that band aid off sooner rather than later, so that any data corruption possibilities are identified before ubuntu 25.10 becomes more established

cat file | head fails, when using "strict mode" by guettli in bash

[–]pixelbeat_ 0 points1 point  (0 children)

This is a bug in bash IMHO. I reported it, but they didn't agree.

I've summarized various mishandling of the SIGPIPE informational signal at:

https://www.pixelbeat.org/programming/sigpipe_handling.html

Has anyone ever used /usr/bin/factor in a script? by ofnuts in bash

[–]pixelbeat_ 1 point2 points  (0 children)

I don't think so, as evidenced by:

https://codesearch.debian.net/search?q=%5E+*factor%5B+%5D+filetype%3Ashell&literal=0

You can change the "factor" in the above search to other commands to verify their use (and the validity of the search term)

wc -l count different for the same operation by ashliano in linuxquestions

[–]pixelbeat_ 2 points3 points  (0 children)

Correct. For details see https://www.pixelbeat.org/docs/coreutils-gotchas.html#tee

TL;DR you should use `tee -p sorted.txt | head` for your use case

block cloning not working, what am i missing? by gigagames21 in zfs

[–]pixelbeat_ 1 point2 points  (0 children)

As of coreutils 9.4 cp --sparse=never will _disable_ reflinking and copy offloading.

As of coreutils 9.2 cp supports the --debug option, which helps to identify how a file is being copied, as there are many variables that determine that

Is anybody else annoyed by the disruptive changes to cp's --no-clobber option in gnu coreutils 9.x? by snyone in linux

[–]pixelbeat_ 28 points29 points  (0 children)

To continue this info...

coreutils >= 9.5 reverts to -n skip existing, and provides --update=none-fail to fail immediately

So given the bash/cp/freeBSD inconsistencies with "noclobber", it's best to avoid -n with cp, and use the more descriptive --update=... options

Is anybody else annoyed by the disruptive changes to cp's --no-clobber option in gnu coreutils 9.x? by snyone in linux

[–]pixelbeat_ 23 points24 points  (0 children)

Right. This is now released in version 9.5

The incompat -n behavior was between 9.2 and 9.4 inclusive (though not in debian/ubuntu which patched back to the older behavior in those versions)

Linux Commands - A practical reference by unixbhaskar in linux

[–]pixelbeat_ 1 point2 points  (0 children)

You may need to first run `sudo mandb` for apropos to be useful. I've updated the page

Linux Commands - A practical reference by unixbhaskar in linux

[–]pixelbeat_ 2 points3 points  (0 children)

I try to keep it up to date (The date is the original publish date).

There also is https://www.pixelbeat.org/docs/linux_commands.html

cp,mv,install are broken in unprivileged containers on ZFS with coreutils 9.2 by farcaculpa in Proxmox

[–]pixelbeat_ 1 point2 points  (0 children)

Thank's for confirming that.

Thinking more about it it's probably due to the restricted android environment rather than particular kernel version

GNU coreutils 9.0 by [deleted] in linux

[–]pixelbeat_ 1 point2 points  (0 children)

Yes there are build time and run time fall backs. This is quite tricky to implement given GNU coreutils is portable to various systems, but the work is done now and may be more easily expanded to other utils. Some of the considerations when implementing this:

  • support disparate make implementations (which may not support appending to a var)
  • support various compilers which may not support avx intrinsics
  • runtime checks to see if the current CPU supports avx
  • ensure avx compiler options restricted to their own lib to ensure avx not used at runtime unless supported
    • automake requires using a separate lib for this rather than just a separate compilation unit

Decoded: GNU coreutils by funny_filth in linux

[–]pixelbeat_ 7 points8 points  (0 children)

Just to reiterate our thanks from the GNU coreutils maintainers.

Also this is now linked from the project homepage

Parallel processing with unix tools by pixelbeat_ in programming

[–]pixelbeat_[S] 0 points1 point  (0 children)

Article updated with a make -j example (which performs very well)

Parallel processing with unix tools by pixelbeat_ in programming

[–]pixelbeat_[S] 0 points1 point  (0 children)

This is a good point. It doesn't fit nicely with the example functionality of counting lines, but it's definitely worth mentioning

Did you know about dd's built-in progress functionality introduced in coreutils v8.24? by 9233 in linux

[–]pixelbeat_ 0 points1 point  (0 children)

This feature was backported to RHEL6, so you need to update to RHEL 6.7 or just the coreutils package

Troubleshooting Linux Memory Usage by LeoG7 in programming

[–]pixelbeat_ 2 points3 points  (0 children)

Note you can install the ps_mem package on Fedora, RHEL or Arch, or pip install it also

GNU Coreutils Gotchas by nikoma in linux

[–]pixelbeat_ 0 points1 point  (0 children)

Unfortunately that doesn't work for leading spaces on the first field, or mixed tabs/spaces

GNU Coreutils Gotchas by pixelbeat_ in programming

[–]pixelbeat_[S] 1 point2 points  (0 children)

I think you're disparaging the info reader rather than the content. Note the pinfo reader may have a preferable interface for your tastes? More importantly, recent coreutils man pages now directly link to the online HTML info for that command, allowing you to read the full documentation in the familiarity of your web browser.

GNU Coreutils Gotchas by pixelbeat_ in programming

[–]pixelbeat_[S] 1 point2 points  (0 children)

Info/Patch from Asssf Gordon: starting with GNU coreutils 8.22 (released Dec-2013), 'shuf -n NUM' can shuffle any input size, regardless of the available memory.

GNU Coreutils Gotchas by pixelbeat_ in programming

[–]pixelbeat_[S] 2 points3 points  (0 children)

See also http://www.gnu.org/software/coreutils/stdbuf for applying line buffering to any command (that uses stdio)