coreutils: a comprehensive review (2023)

30 points by apropos


z3bra

I’d love to know if there’s a compelling use case for install.

I use it in all my makefile's "install" target. install(1) is basically mkdir, cp, chown, chgrp and chmod wrapped in a single command. It's very verbose to type at a shell prompt, but is very handy in script. The following snippets are equivalent:

mkdir -p /usr/local/sbin
cp pgm.sh /usr/local/sbin/pgm
chmod 755 /usr/local/sbin/pgm
chgrp daemon /usr/local/sbin/pgm

install -D -m0755 -g daemon pgm.sh /usr/local/sbin/pgm
pronoiac

Some random notes:

dave@europa~$ df .
Filesystem     1K-blocks      Used Available Use% Mounted on
/dev/sda3      894228804 113366324 735368584  14% /
$ seq 9 10
09
10

I... I'm kinda surprised I had so many feelings about these?

BD103

The section on dd is really interesting! TIL you can use cp to burn disk images, rather than dd. The article provided this interesting example:

I’m still writing this article and since then, I’ve written dozens of OS install images to USB using cp. It works great. I won’t claim any speed increases since I haven’t benchmarked the two methods, but the syntax is so much easier:

# cp downloads/os.3.9.iso /dev/sdb