LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 09-09-2003, 12:03 PM   #1
skate
Member
 
Registered: Aug 2003
Location: Bulgaria
Distribution: OpenSuse 10.3, Debian 4.0r3 "Etch", FreeBSD 7.1, Ubuntu
Posts: 210

Rep: Reputation: 30
Exclamation Show Uptime On Shell Login~


Where and what must i write to show uptime stats when someone user login into shell....

login as: skate
Sent username "skate"
skate@192.168.25.1's password:
Last login: Mon Sep 8 21:56:56 2003 from 192.168.25.3
Machine Uptime Is:
7:03pm up 6 days, 8:48, 1 user, load average: 0.00, 0.00, 0.00
[skate@kapi2000 skate]$

Something like that ?!??! ;] did i must write something in /etc/motd ??!?
 
Old 09-09-2003, 12:52 PM   #2
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 235Reputation: 235Reputation: 235
Probably best to just add it to their .bashrc file in their home directory. I wouldn't necessarily add it to the motd since its not an executable type file, its just read from, etc.
 
Old 09-09-2003, 01:48 PM   #3
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 66
If you want it for all users then stick:
echo Machine Uptime Is:
uptime

At the end of:
/etc/bashrc
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Difference between normal shell and login shell Manish Linux - General 7 11-14-2012 09:30 AM
wrong login shell prevent root login cefs99 Linux - Security 4 05-31-2006 09:28 AM
show last users login wisdom Programming 3 11-17-2005 03:56 AM
show motd on login pirozzi Debian 11 12-15-2004 11:40 AM
Shell script - how to show a specific line of a text file davi_cabral Linux - Software 3 09-28-2004 02:39 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:21 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration