Moreutils: The utilities package every Unix/Linux/Mac OS developer should know

Posted by jcbhmr 1 day ago

Counter42Comment12OpenOriginal

Comments

Comment by JdeBP 1 day ago

We're going to have the it-conflicts-with-GNU-parallel discussion again. It has happened almost every time that this has come up on Hacker News since 2015.

This is entirely a packaging choice. There is no reason that parallel cannot be in its own package, or renamed. In fact, do not believe the old Hacker News discussions where people point to a bug filed in 2010 being closed as 'WONTFIX' by Joey Hess. In the intervening years, Debian has instituted a wild system where it does rename the moreutils parallel, but only if GNU Parallel is also installed. Because Debian made its GNU Parallel package fix the name clash.

* https://sources.debian.org/src/parallel/20240222%2Bds-2/debi...

There is nowadays an open bug report (against moreutils rather than parallel) on this from a user's perspective:

* https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1107381

In contrast, Arch Linux simply changed its packaging to eliminate the name clash back in 2012, by fixing moreutils and not parallel, making it always the parallel-moreutils command.

* https://gitlab.archlinux.org/archlinux/packaging/packages/mo...

Comment by musicale 16 hours ago

I keep hoping people will stop using gnu parallel or that distros will remove its citation begging.

> For 99% of the use cases moreutils' parallel (AKA Tollef parallel) is an equal, or even better, alternative.

https://news.ycombinator.com/item?id=15319859

Comment by jwilk 1 day ago

Comment by kashunstva 1 day ago

Recently the Homebrew team decided to drop support for Intel Macs. So the `brew` install ignores older but perfectly useable Macs. On those boxes, `sudo port install moreutils` should work.

Comment by musicale 16 hours ago

That's very disappointing.

In my dreams this might breathe more life into homebrew alternatives for macOS. (I also wonder whether some of the port systems for BSD and macOS could/should be unified.)

Comment by burnt-resistor 1 day ago

Homebrew governance sucks. The only problem with that is MacPorts requires sudo, which risks the stability of the system. Maybe Nix works on Mac? Or skip shoehorning fragile patched software on a hostile system that is entirely different from production and use tools in containers more similar to production instead.

Comment by musicale 16 hours ago

If you are building for linux, why not use linux tools, in a linux container (which runs on a linux kernel running on a hypervisor?) Apple even provides a Container tool, Containerization framework, etc.

For using Unix tools in native macOS workflows, ports systems like homebrew, macports, pkgsrc, etc. are a decent option.

Comment by wpm 1 day ago

brew requires sudo too, but just once at initial install time

I'm not sure how requiring sudo to install new executables is bad for system stability.

Comment by TheNightman 18 hours ago

nix-Darwin is great, but it doesn’t really make sense in combination with brew. You can manage brew packages in your nix-Darwin config, but I’ve found no need to as of yet

Comment by pi-rat 1 day ago

These are absolute must haves, but I really wish parallel didn’t collide with the super useful GNU/parallel.

Comment by l1ng0 19 hours ago

Be very careful with vidir as deleting happens unprompted.

I find edir to be a better alternative.

https://github.com/bulletmark/edir

Comment by suprjami 1 day ago

Has been in my regular installs for years, even if the only thing I use is errno.

    $ errno 5
    EIO 5 I/O error
    
    $ errno ENOENT
    ENOENT 2 No such file or directory

Comment by kayabyte 1 day ago

[flagged]