LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   linux command (https://www.linuxquestions.org/questions/linux-newbie-8/linux-command-429931/)

smart girl 03-30-2006 04:22 AM

linux command
 
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.

ReefShark 03-30-2006 04:42 AM

last
Code:

sharky  :0                            Thu Mar 30 08:10  still logged in 
reboot  system boot  2.6.15-gentoo-r1 Thu Mar 30 10:08          (02:29)   
sharky  :0                            Wed Mar 29 08:16 - down  (07:46)   
reboot  system boot  2.6.15-gentoo-r1 Wed Mar 29 10:14          (05:48)   
sharky  :0                            Wed Mar 29 10:10 - down  (00:01)   
reboot  system boot  2.6.15-gentoo-r1 Wed Mar 29 10:09          (00:03)

last -d
Code:

sharky  :0          255.255.255.255  Thu Mar 30 08:10  still logged in 
reboot  system boot  0.0.0.0          Thu Mar 30 10:08          (02:29)   
sharky  :0          255.255.255.255  Wed Mar 29 08:16 - down  (07:46)   
reboot  system boot  0.0.0.0          Wed Mar 29 10:14          (05:48)   
sharky  :0          255.255.255.255  Wed Mar 29 10:10 - down  (00:01)   
reboot  system boot  0.0.0.0          Wed Mar 29 10:09          (00:03)

(where 255.255.255.255 is actually my ip which I am not going to post on this or any other board)

smart girl 03-30-2006 05:27 AM

ReefShark

thank you very much you are the best :)

may I ask a question .. does reboot info apears in every linux systems when LAST command is used?

ReefShark 03-30-2006 08:07 AM

I quickly checked... I have RedHat and SLES (SuSE) at work, I use Gentoo on my laptop and currently have Ubuntu installed on my test PC at work. All seem to have this information in their 'last' output. So I'd say most if not all linux systems give this output.


All times are GMT -5. The time now is 08:56 PM.