using grep and awk in threads
What is the best way to use grep and awk together to find users names when they are logged in.
|
Learning grep and awk is good, but not always necessory for getting information about logged in users.
You can simply use "who" or "w" commands to get the list of users currently logged in to the system. Meanwhile, grep and awk both are filters, and used to manipulate the output of some command. Grep is normally used to filter some "keyword" from stream of data, whereas awk is a multi-function interpreter launguage, commonly used to cut field (columns) of some data stream. |
Another good one is "last". It does ftp and ssh logins along with timestamps for login and logout.
-Tristan |
All times are GMT -5. The time now is 04:27 PM. |