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!
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.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
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.
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
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.