3 ms·
ProTip: You can switch back to Gnu coreutils on 26.04 with: apt install coreutils-from-gnu coreutils-from-uutils- --allow-remove-essential And pin it so an up
by linsomniac 20d ago
ProTip: You can switch back to Gnu coreutils on 26.04 with:
apt install coreutils-from-gnu coreutils-from-uutils- --allow-remove-essential
And pin it so an upgrade doesn't flip it back with:
printf 'Package: coreutils-from-uutils\nPin: release a=*\nPin-Priority: -10\n' \
| sudo tee /etc/apt/preferences.d/uutils > /dev/null
- chris_st 20d agoJust curious, why the 'sudo tee {file} > /dev/null'?
- c0balt 20d agoit writes to the file with elevated priviledges and doesn't write it back to the terminal, effectively a 'sudo sh -c '{cmd} > {file}''. sudo tee is a common way to work around priviledge restrictions in shell pipes (you can't easily 'sudo' a pipe), if /secure was 0600 and owned by root: "sudo echo "test" > /secure" or "sudo printf '' > /secure", would not work because your user's shell process can't write to /secure. However, "echo 'test' | sudo tee /secure" works because the elevated 'sudo tee' can write to the file.
- chris_st 19d agoCool, thanks!