LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
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, 11:03 AM   #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, 11:52 AM   #2
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
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, 12:48 PM   #3
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

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

At the end of:
/etc/bashrc
 
  


Reply



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 08:30 AM
wrong login shell prevent root login cefs99 Linux - Security 4 05-31-2006 08:28 AM
show last users login wisdom Programming 3 11-17-2005 02:56 AM
show motd on login pirozzi Debian 11 12-15-2004 10:40 AM
Shell script - how to show a specific line of a text file davi_cabral Linux - Software 3 09-28-2004 01:39 PM

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

All times are GMT -5. The time now is 03:45 AM.

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
Open Source Consulting | Domain Registration