Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Location: Geneva - Switzerland ( Bordeaux - France / Montreal - QC - Canada)
Distribution: Slackware 14.2 - 32/64bit
Posts: 609
Rep:
Quote:
Originally Posted by learnlinuxvn
I want to filter condition show who command to display only the login names and hours logged
Well... A little bit of English improvement would be a GREAT help for the rest of your work... As docs are written in english and to get proper help, it's better to be understood... I'm not sure we understand what you want...
I guess... That you want to display some info exclusively... So:
1. man man.... USE MAN... man who => Why ? Because OFTEN an argument does what you want.
2. then: "man whatever-you-need"...
3. finally LEARN: grep, sed, awk, Bash (or eq).... Grep/sed helps you to filter text... awk kinda-parse records..
Good luck.
Garry.
PS/ $ who -s ??
Last edited by NoStressHQ; 12-25-2015 at 04:59 AM.
Reason: Reduced mess... a bit :)
I think that at this point we need to wait for the OP to fill us in on what he really needs. We have offered a couple of possible answers to the question he almost asked, and without clarification we are just spinning our wheels. We need direction, and the OP can provide that.
I'm just going with what the OP supplied us. As wpeckham said, we need feedback from the OP if our suggestions had help or not or we're just spinning our wheels on guesses.
As mentioned earlier, Op can try w and last to get additional information on logins.
There is another approach called process accounting. It logs users logins and length of time and what they did, etc. The package name is call psacct
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.