Merge pull request #212 from hemanth/master

Adding docs for 'sudo'
This commit is contained in:
Romain Prieto
2014-06-28 17:49:36 +10:00

20
pages/common/sudo.md Normal file
View File

@@ -0,0 +1,20 @@
# sudo
> execute a command as another user
- Listing of an unreadable directory:
`sudo {{ls}} {{/usr/local/scrt}}`
- To edit a file as user www:
`sudo -u {{www}} {{vi}} {{/var/www/index.html}}`
- To shutdown the machine:
`sudo {{shutdown}} -r +10 {{"Cya soon!"}}`
- To repeat the last command as sudo
`sudo {{!!}}`