Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

can not use command

Status
Not open for further replies.

babeo

Technical User
Mar 30, 2000
398
CA
Hi all

1) I usually use the command who -b but today I cannot use it anymore even I log in as root, could some one tell me what's wrong and if this command affects, is there any other commands will affect too? I don't which commands then. I forgot to say that I even change to the directory contains the command, and I can see the command there, but when I execute the command, I still get the same result is the prompt on the next line, but did not tell me when the system is rebooted.

2) Is there any way to check who logs in the system and doing what? I need to know the path, filename.
Thanks.
 
Hi,
The 'who' command reads the file /var/adm/utmp to get the information that u have requested.Check for the availibility of this file.somebody may have cleared it or deleted it.You can use the 'last' command to see who has logged into your system.
I hope this helps.....
 
NavinB

I know the "who" command will look into the file /var/adm/utm, and the file is getting big, so I did clear the contain after checking who do what, but I don't have problem with the 'who' alone command. I have problem with 'who -b', this command will tell you when your system is reboot, and that what I want to know, but suddenly the option 'b' does not do anything any more. Any idea?

Probably rebooting system will solve the problem?
 
Hey,
Have u tried other options of 'who' command like 'who -a' or 'who -r'.If these are also not working then most probably u'r clearing of the file has made this.But u need not re-boot the system as with time your wtmp file will be updated (that's why u r able to see result of who cmd)but u won't be able to see boot-time with this.if u want just to see boot-time u can view this using the command 'last|grep boot'.
I hope this helps....
 
try this command to give you your last reboot
last reboot | head -1
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top