4 ms·
I've been using the rewritten coreutils as a reference in implementing human-utils[0]. The amount of complexity, even with pretty high-level Rust std, is still
by xixixao 2y ago
I've been using the rewritten coreutils as a reference in implementing human-utils[0].
The amount of complexity, even with pretty high-level Rust std, is still super high. So rewriting them in Rust is no small feat.
For the file-system management ones: I appreciate the value of everyone knowing these tools, but they do have some terrible defaults, and I wish there was an alternative between using a GUI/TUI file manager and carefully not stabbing myself in the foot. That's why I started building human-utils (alas it's very much unfinished).
https://github.com/xixixao/human-utils https://github.com/xixixao/human-utils
- linsomniac 2y agoI like some of the directions you're heading with that. One thing I've thought is it might be useful to have tools that create filesystem objects (like "new" or "mov foo bar/") be able to take permissions. "mov --umask 027 --owner alice:bob foo bar/" and "new --mode a=rx foo/" for example.
- yjftsjthsd-h 2y agoinstall(1) does that: https://www.man7.org/linux/man-pages/man1/install.1.html https://www.man7.org/linux/man-pages/man1/install.1.html
- linsomniac 2y agoIndeed, under very limited circumstances of copying files and the man page says "-o" and "-g" only work as superuser, though I just tested it and that seems to be more a note about how chgrp()/chown() work (if you are changing to a group/user you don't have privs for), and it works in the case of a copy. Indeed very useful in some cases; I use it in CI/CD pipelines and Dockerfiles typically.
- yjftsjthsd-h 2y agoIt also works for creating directories, ex. install -d -m 755 somedir And yeah, I'm pretty sure the owner/group thing is just noting that at least on GNU/Linux that's just how the OS works (I think that varies among unix-likes).