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.
Hi! I am currently running a linux system with about 300 users and I wan't to know how to finger everyone to discover their last login times without fingering everyone manually. I would love to get rid of users or lock accounts that have been idle for 4 months without usage. Are there any recommendations anyone could recommend.
Hi! Thanks for the command. Is there anyway you could give me a run down of what this does? I ran it and it works but I don't know exactly what it accomplishes.
awk being a text processing language, often used in the same breath as another nice tool called sed.
-F: is using : as a field separator
If you look at the /etc/passwd file, you will see the information separated by colons ( : ) .
You may also notice the third field ( $3 ) is a number from 0 on up. Most if not all distros start regular users with a high number, 500 on Fedora and the example given by Tinkster is saying: When field three is greater than 100 use that match.
Once you have a match, pipe ( | ) that info to the finger command.
Personally I'd put awk somewhere between
grep/sed and perl. The things one can do with
either of those in terms of scripting are quite
rudimentary...
Cheers,
Tink
Glad to help
I have only really started to get into scripting the last couple of months, have been doing some stuff over the last couple of years but mainly only recently. I found awk, grep, sed and xargs seem to work so well together, making your scripts come alive, and you get to unleash the full power of linux.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.