RSS Subscription
Linux Howtos & Tutorials

Enter your email:

Delivered by


NOTE:New tutorials are from LinuxCareer.com

Poll

Do you own or wish to have iPhone?
 


Linux eBooks FREE Download
A guide to programming Linux kernel modules
Introduction to Linux - A Hands on Guide
A Newbie's Getting Started Guide to Linux

Linux from Scratch - Create Your Own Linux System - Free eBook

Linux: The Hacking Solution (v.3.0)

SQLite 3 with PHP Essential Training – Free Video Training Tutorials

This guide will introduce you to the world of GNU/Linux

The GNU/Linux Advanced Administration

A Complete Beginner's Manual for Ubuntu 10.04 (Lucid Lynx)

Advanced Bash-Scripting Guide

Set up, maintain, and secure a small office email server

Partner Linux Sites:
How-To.LinuxCareer.com
Jobs.LinuxCareer.com
TuxMachines
Monsterb
LinuxBloggers
AdamsInfo
LinuxScrew
All For Linux

Extract user list from your Linux system

Here is a simple way on how to extract username and full name for all users on your Linux system. Both methods divide /etc/passwd file into columns and print column 1 and 5 where ":" is used as a common delimiter. Column 1 contains username and column 5 contains full name. Using awk:

BEGIN { FS=":" }
{ print $1 "\t" $5 }

save this a extractnames.awk . Now execute awk and include this file:

$ awk -f extractnames.awk /etc/passwd

The same output can be produced also by cut command:

$ cut -d : -f1,5 /etc/passwd 

Share this linux post:

Submit Extract user list from your Linux system in Delicious Submit Extract user list from your Linux system in Digg Submit Extract user list from your Linux system in FaceBook Submit Extract user list from your Linux system in Google Bookmarks Submit Extract user list from your Linux system in Stumbleupon Submit Extract user list from your Linux system in Technorati Submit Extract user list from your Linux system in Twitter
 
Comments for this page are closed !!!
Please visit our new Linux Forum for additional help or discussion.


Linux eBooks FREE Download