LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-27-2010, 12:09 PM   #1
SentralOrigin
Member
 
Registered: Jul 2005
Distribution: Gentoo, Ubuntu
Posts: 318

Rep: Reputation: 30
How to expand who command?


When I do the who command it doesn't show all my info:

Code:
$w sorigin
 6:08PM  up 4 days, 20:33, 177 users, load averages: 7.46, 3.78, 3.43
USER             TTY      FROM              LOGIN@  IDLE WHAT
sorigin            R1       pool-92-199-17-1  5:46PM     - w sorigin
Like in the 'From' column. How do I expand that?

Last edited by SentralOrigin; 08-27-2010 at 12:18 PM.
 
Old 08-27-2010, 12:39 PM   #2
vinaytp
Member
 
Registered: Apr 2009
Location: Bengaluru, India
Distribution: RHEL 5.4, 6.0, Ubuntu 10.04
Posts: 704

Rep: Reputation: 55
Quote:
Originally Posted by SentralOrigin View Post
When I do the who command it doesn't show all my info:

Code:
$w sorigin
 6:08PM  up 4 days, 20:33, 177 users, load averages: 7.46, 3.78, 3.43
USER             TTY      FROM              LOGIN@  IDLE WHAT
sorigin            R1       pool-92-199-17-1  5:46PM     - w sorigin
Like in the 'From' column. How do I expand that?
What distro are you using ?

I am posting this from a fedora 12 distribution, I get following output from command w not who.

If I understand your thread correctly FROM column shows from where the user has logged in. In your case the user has logged in from the host pool-92-199-17-1

Are you looking for anything more ?
 
Old 08-27-2010, 12:44 PM   #3
SentralOrigin
Member
 
Registered: Jul 2005
Distribution: Gentoo, Ubuntu
Posts: 318

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by vinaytp View Post
What distro are you using ?

I am posting this from a fedora 12 distribution, I get following output from command w not who.

If I understand your thread correctly FROM column shows from where the user has logged in. In your case the user has logged in from the host pool-92-199-17-1

Are you looking for anything more ?
Well I want it to display the columns fully. 'pool-92-199-17-1' is the start of my hostname, but it gets cut off. How do I make it display all the columns in full length?
 
Old 08-27-2010, 01:03 PM   #4
vinaytp
Member
 
Registered: Apr 2009
Location: Bengaluru, India
Distribution: RHEL 5.4, 6.0, Ubuntu 10.04
Posts: 704

Rep: Reputation: 55
Quote:
Originally Posted by SentralOrigin View Post
Well I want it to display the columns fully. 'pool-92-199-17-1' is the start of my hostname, but it gets cut off. How do I make it display all the columns in full length?
As per man w there are no way to expand. There are couple of other commands which may come to your help like
Code:
finger
who command combined with different switches
 
Old 08-27-2010, 01:06 PM   #5
SentralOrigin
Member
 
Registered: Jul 2005
Distribution: Gentoo, Ubuntu
Posts: 318

Original Poster
Rep: Reputation: 30
Okay well the only information I am missing is the 'From' column then. finger or who do not show hostnames/IPs, so what command will show the full hostname?
 
Old 08-27-2010, 01:11 PM   #6
vinaytp
Member
 
Registered: Apr 2009
Location: Bengaluru, India
Distribution: RHEL 5.4, 6.0, Ubuntu 10.04
Posts: 704

Rep: Reputation: 55
Quote:
Originally Posted by SentralOrigin View Post
Okay well the only information I am missing is the 'From' column then. finger or who do not show hostnames/IPs, so what command will show the full hostname?
Definitely there is similarity, Can you observe the similarity of Office column of finger command and FROM column of w command

As per your requirement you can cut the required field of Office column which is in expanded format unlike w command.

Code:
[vinay@vinay ~]$ finger
Login     Name       Tty      Idle  Login Time   Office     Office Phone
vinay     vinay TP   tty1     1:32  Aug 27 21:06 (:0)
vinay     vinay TP   pts/0          Aug 27 22:04 (:0.0)
vinay     vinay TP   pts/1          Aug 27 22:16 (localhost.localdomain)
Code:
[vinay@vinay ~]$ w
 22:39:41 up  1:34,  3 users,  load average: 0.52, 0.50, 0.21
USER     TTY      FROM              LOGIN@   IDLE   JCPU   PCPU WHAT
vinay    tty1     :0               21:06    1:33m  1:04   0.04s pam: gdm-password
vinay    pts/0    :0.0             22:04    0.00s  0.21s  0.19s ssh -l vinay localhost
vinay    pts/1    localhost.locald 22:16    0.00s  0.11s  0.01s w

Last edited by vinaytp; 08-27-2010 at 01:14 PM.
 
1 members found this post helpful.
Old 08-27-2010, 01:29 PM   #7
SentralOrigin
Member
 
Registered: Jul 2005
Distribution: Gentoo, Ubuntu
Posts: 318

Original Poster
Rep: Reputation: 30
Code:
$ finger -so sorigin
Login            Name                 TTY  Idle  Login  Time   Office  Phone
sorigin          theshell.com        *n5         Fri    19:25
It doesn't show anything?
 
Old 08-27-2010, 01:38 PM   #8
vinaytp
Member
 
Registered: Apr 2009
Location: Bengaluru, India
Distribution: RHEL 5.4, 6.0, Ubuntu 10.04
Posts: 704

Rep: Reputation: 55
Well, I hope you are using ubuntu or Gentoo distro as per your profile.

You may have to explore. Sorry I do not have other distros apart from fedora 12 with me right now.

All the best !!
 
  


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
Partion expand seenu_79 Linux - Newbie 2 07-21-2010 01:02 AM
[SOLVED] Expand an array? yaplej Programming 14 11-01-2009 01:55 AM
Amarok - expand all? Changes Linux - Software 0 10-27-2008 09:10 PM
expand LVM madunix Linux - General 5 11-13-2007 10:03 AM
ntfs expand edgefield Linux - General 6 10-23-2004 10:28 PM


All times are GMT -5. The time now is 01:15 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