This website works better with JavaScript.
Home
Explore
Help
Sign In
david.wurm
/
InternetServicesBook
mirror of
https://github.com/trimstray/the-book-of-secret-knowledge
Watch
1
Star
0
Fork
0
Code
Releases
0
Activity
Browse Source
test if the current user is sudo-su'd into this session
- signed-off-by: lbonanomi <lbonanomi@gmail.com>
pull/39/head
lbonanomi
5 years ago
parent
f42515078a
commit
985714befd
1 changed files
with
6 additions
and
0 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+6
-0
README.md
+ 6
- 0
README.md
View File
@@ -1227,6 +1227,12 @@ ___
who -b
```
###### Detect a user sudo-su'd into the current shell
```
[[ $(who -m | awk '{ print $1 }') == $(whoami) ]] || echo "You are su-ed to $(whoami)"
```
___
##### Tool: [screen](https://en.wikipedia.org/wiki/GNU_Screen)
Write
Preview
Loading…
Cancel
Save