Linux: permission denied

github logo ・1 min read

If you run the command less /etc/shadow you'll get /etc/shadow: Permission denied so you have to run it with sudo command, but if you assign a alias like this alias please='sudo $(history -p !!)' and just run please after you get permission denied that it should work :)

twitter logo DISCUSS (3)
markdown guide
 

I always love to see what creative alias names people come up with.

Reminds me a bit of SUDO, a neat little bit of code for Bash that automatically runs commands with sudo when you type the command name in all caps (so you can get your computer to ignore permission errors by shouting at it).

 
 

$(history -p !!) runs the last command you run. For example if you run less /etc/shadow, then sudo $(history -p !!) would be sudo less /etc/shadow

Classic DEV Post from Jun 7 '18

Pros and cons of functional programming

Basics, pros and cons, use cases and ways to learn functional programming.

Arber Avdullahu profile image
Golang developer, good at mathematics

Like what you're reading?
Hit the +FOLLOW button.

❤️