LINUX.IE, website of the Irish Linux Users' Group
Tux rules!

   
Home
New Users
Articles
Download
Projects
Community
Vendors

  Print Version
Email to...
 
Archives:


planetILUG

Recent News

News Archive


Join the
ILUG
on FaceBook


Join the
ILUG
on LinkedIn


Join the
ILUG SETI
Group



















 
 :: Mailing Lists

[ILUG] Command-line output and screen width: ps aux | grep puzzle

[ILUG] Command-line output and screen width: ps aux | grep puzzle

Cormac McClean cmcclean at ait.ie
Thu Feb 15 09:32:22 GMT 2001


Hi,

I'm teaching an introductory course on Linux, with an emphasis
on system administration.

We've been examining basic process management in class, the most
immediate application being killing a non-responding process (e.g.
netscape).  So the steps are as follows:
1. Run netscape from /usr/local/netscape/netscape
2. Run ps aux | grep netscape
3. Identify the PID from the output and then kill the process.

However, I was puzzled when I tried this: netscape wasn't showing
up in response to 
	ps aux | grep netscape
So I just ran ps aux on its own, and I get
	(process details) ......./usr/local/netsca
i.e. the command line name has been truncated, so grep is not picking
up netscape from the output of ps aux. Now, it will work if I tell
grep to look for netsca, i.e.
	ps aux | grep netsca
but this isn't satisfactory when teaching beginners - "you can't enter
the whole name of the program, just the first part of it".
What if the command-line path was longer, and the executable was
omitted entirely from the output of ps aux? e.g.

The reason for this seems to be that the default terminal setting is 
for 80 characters width; is it possible to increase this, or is there 
a better way to approach this problem?

Running Mandrake 7.1 by the way.

Thanks in advance,
Cormac.




More information about the ILUG mailing list
Read this without the formatting.
                                                                                                    

 

Hosted by HEAnet


Maintained by the ILUG website team. The aim of Linux.ie is to support and help commercial and private users of Linux in Ireland. You can display ILUG news in your own webpages, read backend information to find out how. Networking services kindly provided by HEAnet, server kindly donated by Dell. Linux is a trademark of Linus Torvalds, used with permission. No penguins were harmed in the production or maintenance of this highly praised website. Looking for the Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!
RSS Version
Powered by Dell