Séra Balázs to linuxmemesEnglish • 1 year agoSometimes less is moreimagemessage-square32arrow-up1247arrow-down126
arrow-up1221arrow-down1imageSometimes less is moreSéra Balázs to linuxmemesEnglish • 1 year agomessage-square32
minus-square@[email protected]linkfedilinkEnglish33•1 year agoI think you’d have to do echo o | sudo tee /proc/sysrq-trigger, otherwise sudo only works for the echo, not the write.
minus-square@[email protected]linkfedilinkEnglish14•1 year agoHoly shit the reason for tee never really clicked until I saw this post. I’d used it in pasted commands, but it had always seemed superfluous.
minus-square@[email protected]linkfedilinkEnglish13•1 year agoIt writes to a file like >, and echos it back at the same time; in this case the latter isn’t needed (we’re just using it to write with sudo), but it’s good to know.
I think you’d have to do
echo o | sudo tee /proc/sysrq-trigger
, otherwise sudo only works for the echo, not the write.Holy shit the reason for
tee
never really clicked until I saw this post. I’d used it in pasted commands, but it had always seemed superfluous.What does
tee
do?It writes to a file like
>
, and echos it back at the same time; in this case the latter isn’t needed (we’re just using it to write with sudo), but it’s good to know.echo c | sudo tee /proc/sysrq-trigger
🫣Ah I guess I just use sudo bash a lot 😅