4 ms·
The biggest takeaway for me is that I learned about the existence of some utilities that I had never known were there. Specially "factor" and "tsort".
by ufo 6y ago
The biggest takeaway for me is that I learned about the existence of some utilities that I had never known were there. Specially "factor" and "tsort".
- vram22 6y agoThere are many cool / useful less-known utilities in GNU / Linux. Check man7.org for good, though brief info on many of them. I had explored many of them a while ago. Maintained by Michael Kerrisk, author of The Linux Programming Interface, a kind of reference bible for Linux APIs and system calls. Edit: many of which are used in making such utilities.
- MaxBarraclough 6y agoDon't forget recutils. https://www.gnu.org/software/recutils/manual/A-Little-Example.html#A-Little-Example https://www.gnu.org/software/recutils/manual/A-Little-Exampl... https://en.wikipedia.org/wiki/Recfiles https://en.wikipedia.org/wiki/Recfiles
- vram22 6y agoRight, good point. It has also been discussed on HN a few times: https://hn.algolia.com/?dateRange=all&page=0&prefix=false&query=recutils&sort=byPopularity&type=all https://hn.algolia.com/?dateRange=all&page=0&prefix=false&qu...
- rustyminnow 6y agoHere's the list of coreutils pages for anybody else interested: https://man7.org/linux/man-pages/dir_by_project.html#coreutils https://man7.org/linux/man-pages/dir_by_project.html#coreuti...
- rwmj 6y agoThere's also "moreutils"[1] which is a set of useful additional tools. "errno" is indispensable if you're a Linux programmer. [1] https://joeyh.name/code/moreutils/ https://joeyh.name/code/moreutils/
- rank0 6y agoThat's pretty neat! But I feel some of those tools can just be implemented with coreutils, pipes, and redirects...
- jasomill 6y agoWhile not as fancy as errno(1), perl -e '$! = shift and print "$!\n"' ERRNO works to decode (nonzero) ERRNO if Perl is installed (per strerror(3) in the C runtime library linked to Perl, so YMMV on non-POSIXish platforms). Speaking of portability, Microsoft's err.exe[1] is a conceptually similar tool that references a considerably larger collection of Windows error messages (user and kernel mode Win32 error codes, COM HRESULTs, etc) and is therefore far more useful on Windows platforms than anything naïvely implemented in terms of C runtime errno (e.g., my stupid Perl one-liner).
- cillian64 6y agoI use sponge from moreutils all the time. You know how you always want to ‘sort <file >file’ or something but that doesn’t work because file gets truncated before it gets read? With sponge you can do ‘sort <file | sponge file’