Linux  and Free Software :: linux commands



hi all

I am newbie in linux and I've just started learning how to use it.

actually I hadn't installed linux on my Pc yet, instead I used knoppix std which seems to operate like lenux.

the problem of using knoppix that it does not perform some commands as they must be.

for example:
the last command, if we use it with -d option it must display the IP address but it does not do so.

another problem is that I an required to write a program to do some operations in the date of login displayed in last command and since I don't know how data are displayed using last command I will not be able to write that program.

what I need is if any one of you could show me a screen shot of text to the result of last command with some options and with out.


YOUR KIND RESPONSE IS APRECIATED

Is this what you want?

http://www.linuxdevcenter.com/linux/cmd/cmd.csp?path=l/last

I think this is a bash command so you need to be in a bash terminal.

I don't think it will display an IP address if the given user is connected locally....but that's just a guess.
Code Sample
last -5 -d mik
mik      pts/1                         Thu Mar 30 09:51 - 09:52  (00:00)    
mik      pts/1                         Wed Mar 29 10:20 - 10:21  (00:00)    
mik      tty1                          Tue Mar 28 14:22   still logged in  
mik      tty1                          Tue Mar 28 13:49 - down   (00:28)    
mik      pts/3                         Tue Mar 28 08:50 - 08:51  (00:00)

last -5 pts/1
mik      pts/1                         Thu Mar 30 09:51 - 09:52  (00:00)    
mik      pts/1                         Wed Mar 29 10:20 - 10:21  (00:00)    
mik      pts/1                         Thu Mar 23 09:22 - 09:23  (00:00)    
mik      pts/1                         Thu Mar 23 09:20 - 09:21  (00:00)    
mik      pts/1                         Wed Mar 22 09:21 - 09:22  (00:00)


original here.