The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Operating Systems > OS X (Apple)
.
google unix.com



OS X (Apple) OS X is a line of Unix-based graphical operating systems developed, marketed, and sold by Apple.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
alias command within .profile venhart UNIX for Dummies Questions & Answers 13 09-17-2009 04:04 PM
All alias in .profile lost when "script" command is called amicon007 UNIX for Advanced & Expert Users 3 12-03-2008 03:22 AM
Alias problem cleansing_flame UNIX for Dummies Questions & Answers 1 02-18-2008 03:44 AM
alias problem Mattiax UNIX for Dummies Questions & Answers 5 10-17-2006 11:56 AM
alias in .profile davinxi UNIX for Dummies Questions & Answers 3 09-23-2005 12:47 AM

Reply
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 08-13-2009
mikey11415 mikey11415 is offline
Registered User
  
 

Join Date: Aug 2009
Posts: 1
Problem using a top command alias in my profile

Hi-

I am newish to the mac osx unix interface. I want to set up top so that it always displays the username. I can use this command to do this:

top -ocpu -P ' PID COMMAND %CPU TIME #TH #PRTS #MREGS RPRVT RSHRD RSIZE VSIZE USER' -p '$aaaa ^bbbbbbbbb $cccc $wwwwwww $ee $ffff-$ggggg $hhhh- $iiii- $jjjj- $llll- $nnnnnnnn'

This works great! The username displays last each time.

BUT, since I always want top to act this way, I put this into my etc/profile file as an alias, just the same way:

alias top="top -ocpu -P ' PID COMMAND %CPU TIME #TH #PRTS #MREGS RPRVT RSHRD RSIZE VSIZE USER' -p '$aaaa ^bbbbbbbbb $cccc $wwwwwww $ee $ffff-$ggggg $hhhh- $iiii- $jjjj- $llll- $nnnnnnnn'"

This does NOT work. When I do top, I get this on each PID line:

top % - - - - -

???what am I doing wrong???

This is a mac running osx 10.5 server.

Thanks!

Mike
  #2 (permalink)  
Old 08-14-2009
vidyadhar85's Avatar
vidyadhar85 vidyadhar85 is offline Forum Staff  
Moderator(The Tutor)
  
 

Join Date: Jun 2008
Location: INDIA
Posts: 1,419
what does these variable mean??
$cccc $wwwwwww $ee $ffff-$ggggg $hhhh- $iiii- $jjjj- $llll- $nnnnnnnn
Reply

Bookmarks

Tags
alias, osx, top

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 12:23 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0