The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Can we get the list of users who accessed a file Chanakya.m Shell Programming and Scripting 2 09-18-2007 06:58 AM
List current paths of users Gandalf77 UNIX for Dummies Questions & Answers 4 10-02-2006 05:02 AM
list users current path Gandalf77 UNIX for Advanced & Expert Users 1 09-29-2006 09:14 AM
How do you list users in a solaris group gillbates SUN Solaris 6 09-28-2006 10:28 AM
Trying to get list of logged on users sorted kungfuice Shell Programming and Scripting 7 07-26-2006 03:35 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 04-09-2007
bobby36 bobby36 is offline
Registered User
  
 

Join Date: Apr 2007
Posts: 10
Question How to obtain list of users ?

How to obtain list of users found in /home/ and append it to a file.
  #2 (permalink)  
Old 04-09-2007
ennstate ennstate is offline
Registered User
  
 

Join Date: Mar 2007
Location: Chennai
Posts: 222
In case your machine is not an network, You can get the list of users from /etc/passwd file

In case of NFS,try ypcat passwd

Also try ls -ld /home/*/

Thanks,
Nagarajan Ganesan
  #3 (permalink)  
Old 04-09-2007
bobby36 bobby36 is offline
Registered User
  
 

Join Date: Apr 2007
Posts: 10
thanks nagarajan but i cannot append it to file .Is it because am using putty.I want the users append to a file.
  #4 (permalink)  
Old 04-09-2007
ennstate ennstate is offline
Registered User
  
 

Join Date: Mar 2007
Location: Chennai
Posts: 222
You use PuTTy to connect to the Unix box from the Windows client? If so then shouldn't be a problem.

What is the error you get when u try to output the results to a file?

Thanks
Nagarajan Ganesan
  #5 (permalink)  
Old 04-09-2007
bobby36 bobby36 is offline
Registered User
  
 

Join Date: Apr 2007
Posts: 10
It gives me the followin error msg
-bash : permission denied

am using
ls -l >> <filename> to append the list of users in /home/

ls-l and ls -ld/home/*/ r giving the same output so used ls-l

kind regards
  #6 (permalink)  
Old 04-09-2007
ennstate ennstate is offline
Registered User
  
 

Join Date: Mar 2007
Location: Chennai
Posts: 222
It seems that you dont permisson to the directory where you are creating the outfile.

Check if the current directory from which you tried to run the command,has the write access or create the Output to the some other directory to which you have write access.

You could try writing it to either some directory under your home or use /tmp

ls -ld /home/*/ > /tmp/OutFile
(or)
ls -ld /home/*/ > /home/<YourLogin>/OutFile

Thanks
Nagarajan Ganesan.
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 08:14 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0