W' commands in Linux
Before writing this article I had a funny realization that a linux or a unix shell has so much power in it that none of us can claim that he knows it all. There is always something new to learn of hear about.
These are few examples which many of you may but was a strange discovery for me.
W - This command is equivalent to looking at the task manager user tab in windows. It shows all people who are connected to the Linux shell and the last command execute by them. Handy command to use in server client architecture.
watch - My personal favorite. It does exactly what it says. If combine it with another command it goes into a non-input session where it refreshes the associated command every 2 sec. For eg if you ran watch w it will show almost a real time view of which users are logged in.
whoami - This is an important command shows which user you have used to log in to the system. This is widely used and is one of the basic commands.
which - I don't have to explain this one . This shows the path of any executable which is in PATH. For eg : "which ls" shows "/bin/ls"
wall - Want to send messages to all users in system ,who has logged in using a tty. Just type wall and the message.
who - This is similar to w but this gives a quick view rather than the elaborate view.
whereis - Another favorite of mine. This is similar to which but this not only gives the location of the binary but also the man pages of that binary.
Well all of these are quite handy to have around and I am loving them. Late discovery for me but worth it. If you want to know more about these commands use the man pa