β² 221 βΌ Sometimes less is more (lemmy.world) submitted 3 years ago by bali10050@lemmy.world to c/linuxmemes@lemmy.world 32 comments fedilink hide all child comments
[β] mvirts@lemmy.world 15 points 3 years ago (1 child) Wait you guys don't sudo echo o > /proc/sysrq-trigger? permalink fedilink source hideshow 2 child comments replies: [β] SteveTech@programming.dev 33 points 3 years ago (3 children) I think you'd have to do echo o | sudo tee /proc/sysrq-trigger, otherwise sudo only works for the echo, not the write. permalink fedilink source parent hideshow 6 child comments replies: [β] outdated_belated@lemmy.sdf.org 14 points 3 years ago (1 child) 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. permalink fedilink source parent hideshow 2 child comments replies: [β] clumsyninza@lemmy.world 5 points 3 years ago* (1 child) What does tee do? permalink fedilink source parent hideshow 2 child comments replies: [β] SteveTech@programming.dev 13 points 3 years ago 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. permalink fedilink source parent [β] GuyNoIRQ@infosec.pub 8 points 3 years ago echo c | sudo tee /proc/sysrq-trigger π«£ permalink fedilink source parent [β] mvirts@lemmy.world 6 points 3 years ago Ah I guess I just use sudo bash a lot π permalink fedilink source parent
[β] SteveTech@programming.dev 33 points 3 years ago (3 children) I think you'd have to do echo o | sudo tee /proc/sysrq-trigger, otherwise sudo only works for the echo, not the write. permalink fedilink source parent hideshow 6 child comments replies: [β] outdated_belated@lemmy.sdf.org 14 points 3 years ago (1 child) 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. permalink fedilink source parent hideshow 2 child comments replies: [β] clumsyninza@lemmy.world 5 points 3 years ago* (1 child) What does tee do? permalink fedilink source parent hideshow 2 child comments replies: [β] SteveTech@programming.dev 13 points 3 years ago 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. permalink fedilink source parent [β] GuyNoIRQ@infosec.pub 8 points 3 years ago echo c | sudo tee /proc/sysrq-trigger π«£ permalink fedilink source parent [β] mvirts@lemmy.world 6 points 3 years ago Ah I guess I just use sudo bash a lot π permalink fedilink source parent
[β] outdated_belated@lemmy.sdf.org 14 points 3 years ago (1 child) 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. permalink fedilink source parent hideshow 2 child comments replies: [β] clumsyninza@lemmy.world 5 points 3 years ago* (1 child) What does tee do? permalink fedilink source parent hideshow 2 child comments replies: [β] SteveTech@programming.dev 13 points 3 years ago 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. permalink fedilink source parent
[β] clumsyninza@lemmy.world 5 points 3 years ago* (1 child) What does tee do? permalink fedilink source parent hideshow 2 child comments replies: [β] SteveTech@programming.dev 13 points 3 years ago 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. permalink fedilink source parent
[β] SteveTech@programming.dev 13 points 3 years ago 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. permalink fedilink source parent
[β] GuyNoIRQ@infosec.pub 8 points 3 years ago echo c | sudo tee /proc/sysrq-trigger π«£ permalink fedilink source parent
[β] mvirts@lemmy.world 6 points 3 years ago Ah I guess I just use sudo bash a lot π permalink fedilink source parent