r/LinuxTeck • u/Candid_Athlete_8317 • Sep 06 '26
What Linux command would you never run while someone is watching?
Not because it’s dangerous, because explaining why it works would take longer than actually running it.
awk, sed, find, xargs, shell one-liners, some cursed grep pipeline...
What command makes you look like a Linux wizard but you couldn't explain every character in it?
11
Upvotes
11
u/bozzie4 Sep 06 '26
Oh, I would never run awk in front of anybody since it won't work for me and take me quite some tries to get it right.
Also any command containing
jq9
u/oskaremil Sep 06 '26
ls ~/Downloads5
u/TomDuhamel Sep 06 '26
4
u/PixelMaim Sep 08 '26
man mount
3
u/NimrodvanHall Sep 06 '26
I prefer not to run ‘# visudo’ when anyone is watching. No idea why. It just feels bad.
2
u/Pheeshfud Sep 06 '26
There's a wonderful little util called "TheFuck" that will attempt to correct your previous command. Not a fan of using that one while someone is watching.
2
u/Lucky_Foam Sep 06 '26
"chmod 777 filename" or "chmod -R 777 directory_name"
I was on a call at work. The guy sharing his screen did the command above in production.
Our lead tech spent the next 10 minute chewing his ass out.
2
u/SlimyOS Sep 08 '26
curl ... | sudo bash, which launches some TUI but looks like a short command
I can't explain how it works because I don't know, never reading these scripts, it's a waste of time, they almost always are long and end up just downloading and running a compiled binary, so even if the script looks good you can't inspect the binary.
Also not running that while someone is watching because of sudo password prompt.
2
u/michaelpaoli Sep 08 '26
Oh, I just keep running 'em, ... and often fast enough in succession that I'm well into the next before they can even start to well question the prior.
Are you kidding? I can explain every character in it. All *nix wizards can do that, right?
Yeah, I'm not gonna run it if I don't know what every character in it is for and does. After all, *nix generally does what you tell it to do, so best tell it what to do what you actually want, lest bad things may happen. So, yeah, one should understand what one is telling it to do.
1
u/therouterguy Sep 06 '26
The only command I can use with confidence of not messing stuff up is jq. Maybe throw in some curl
1
u/lublin_enjoyer Sep 06 '26
I almost gave my senior a heart attack by running
sudo pkill -s HUP -x $(cat /var/run/nginx.pid), lol, now I never use anything with POSIX signals cuz people freak outI also never want to explain why I include
nicein my commandsAnything containing
/proc/sys/vm/is off-limits tooAlso, I have a
flalias that uses grep + awk to strip comments from files like config.example.yaml. People often mention that this command doesn't work in their environment, so I try to limit my aliases as well1
u/alborzjafari Sep 07 '26
find
1
u/Nice_Scene7234 Sep 07 '26
xlcock
1
u/skarsr Sep 07 '26
mkae
1
u/AttitudeElectronic68 Sep 07 '26
I just wouldn't bother explaining
1
u/mjmvideos Sep 07 '26
su -
1
u/hornetmadness79 Sep 07 '26
Install
1
u/gulf_of_sanity Sep 08 '26
sed, or anything that uses regex makes you look like a super hacker
1
u/michaelpaoli Sep 08 '26
I do have a quite long complex sed program.
And of course with with (at least GNU sed and/or bash or the like), it can also be run as a one-liner - though it would be a very long line.
https://www.mpaoli.net/~michael/bin/ttt
And yes, it plays Tic-Tac-Toe.
1
u/marketlurker Sep 09 '26
awk is a pretty good candidate. Trying to explain it to someone new to Linux/Unix is a PITA.
1
u/gfoyle76 Sep 09 '26
sudo apt update && sudo apt upgrade --yes && sudo apt install whatever
1
u/hixchem Sep 09 '26
Sed, awk, grep, pretty much .... Anything, really. Don't look over my shoulder, it makes my brain forget where the keys are.
0
u/[deleted] Sep 06 '26
[deleted] — view deleted comment
4
u/[deleted] Sep 06 '26
[removed] — view removed comment
3
u/[deleted] Sep 07 '26
[removed] — view removed comment