English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

How can I use the who and whoami commands to view all logged in users excluding me?

2006-11-25 20:46:38 · 1 answers · asked by Anonymous in Computers & Internet Software

1 answers

The grep command has a -v switch that tells it to spit out everything EXCEPT what matches the next parameter. Backticks (`) tell Unix to run what's between them and substitute the result for that part of the command line. So...

who | grep -v `whoami`

...should do the trick

2006-11-25 20:49:55 · answer #1 · answered by watsonc64 3 · 0 0

fedest.com, questions and answers