LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 11-28-2005, 01:36 PM   #1
mussussu
LQ Newbie
 
Registered: Oct 2005
Posts: 11

Rep: Reputation: 0
how to filter output from passwd file


I would like to know how can I type a command to filter the output of the passwd file to only get the entries of the user name and userID, the purpose is for security, because only root has an ID of 0,
thanks for the response
 
Old 11-28-2005, 01:48 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
awk -F: '{print $1" "$3}' /etc/passwd


Cheers,
Tink
 
Old 11-28-2005, 04:17 PM   #3
mussussu
LQ Newbie
 
Registered: Oct 2005
Posts: 11

Original Poster
Rep: Reputation: 0
Thanks for the quick response

hey, thanks for the answer, very helpful
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
php filter file name question feetyouwell Programming 1 01-31-2005 12:48 PM
how to open file in filter program? jayashrik Programming 1 01-26-2005 01:48 AM
the sound gives output when using mic but no output when run a music file medo Debian 0 04-19-2004 07:17 PM
How can I filter the output of grep to exclude certain cases? QtCoder Linux - General 1 03-28-2004 12:05 AM
How to filter lines from a text file Rascale Linux - Software 1 10-28-2003 12:46 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 07:16 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration