Reputation
15,800
Top tag
Next privilege 20,000 Rep.
Access 'trusted user' tools
Badges
4 32 75
Impact
~982k people reached

Aug
23
awarded  Good Question
Aug
20
awarded  Enlightened
Aug
20
awarded  Nice Answer
Jul
27
comment Prompt for sudo password and programmatically elevate privilege in bash script?
@wrongusername install sudo, it's much better than using su. But if you really want, probably exec su -c "$0" "$@"
Jul
22
awarded  awk
Jul
20
awarded  Enlightened
Jul
20
awarded  Nice Answer
Jul
13
comment SSH requires password for first login
Is your local key password protected? If so, it's probably the local instance asking. Not sure why it'd cache for so long though.
Jul
5
comment Making the current directory as if it were where an absolute path starts
Note that you'll need hard links to all the executables and libraries you need inside the chroot tree.
Jul
5
comment How can I write to the second line of a file from the command line?
@CMCDragonkai I'm not quite sure what you're asking for. Just print the first line of the specified file and a set second line? First line and then the contents of a file? The first line of the first file and then a line from a second file for each remaining line in the first? You may want to ask a new question with a very specific description of what you want, and a relatively short but complete example.
Jul
4
awarded  Enlightened
Jul
4
awarded  Nice Answer
Jul
3
comment What does “are you root?” mean?
@o11c I'd argue those are the same people who would never encounter that problem without sudo because they're always logged in as root.
Jul
3
comment What does “are you root?” mean?
Really, OP should su to root just long enough to install and set up sudo.
Jun
29
comment How do I program Python so that it outputs to all terminals in Linux
Can you install tmux or screen? Both can run a session in the background and you can just connect to (or disconnect from) it when needed.
Jun
28
comment Add a newline into a filename with `mv`
BTW, in zsh you can also enter a newline with esc return (not together, release the esc before hitting return)
Jun
28
comment Add a newline into a filename with `mv`
Well, you can copy and paste into the mv command just as easily as touch.
Jun
28
comment Add a newline into a filename with `mv`
What makes you think doing it with mv would be any different from doing it with touch? Did you try the same thing?
Jun
24
awarded  Nice Answer
Jun
18
comment How to “less” a file named “-”?
@Kwaio this is certainly neither the most portable nor the most command-independent solution; in fact, it doesn't even work on the file in the question. ./- is the correct answer. -- is only "best practice" when using a wildcard at the start of the file name on commands that recognize it (which is not all, and for those gnu utilities that do, their counterparts on other systems may not).