LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 11-20-2002, 11:56 AM   #1
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,406

Rep: Reputation: 1965Reputation: 1965Reputation: 1965Reputation: 1965Reputation: 1965Reputation: 1965Reputation: 1965Reputation: 1965Reputation: 1965Reputation: 1965Reputation: 1965
how to find a looooooooong command line


anyone aware of a way to get a command line that's too long to fit on one line? i have a 200 character command line, and i can't find out what it actualy is, as ps let's it run off the end of the screen.... the command is listed in /proc/[pid]/cmdline but it's got no spaces in it....
 
Old 11-20-2002, 11:59 AM   #2
chrisharkness
Member
 
Registered: Nov 2002
Location: Halifax, UK
Distribution: Debian
Posts: 36

Rep: Reputation: 15
i guess if you look in a console window in X, and whack your resolution up high it may all fit one one screen, as for a proper way, i dont know
 
Old 11-20-2002, 12:17 PM   #3
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,406

Original Poster
Rep: Reputation: 1965Reputation: 1965Reputation: 1965Reputation: 1965Reputation: 1965Reputation: 1965Reputation: 1965Reputation: 1965Reputation: 1965Reputation: 1965Reputation: 1965
yeah i'd rather have a "proper" way. thanks.
 
Old 11-20-2002, 12:32 PM   #4
unSpawn
Moderator
 
Registered: May 2001
Posts: 27,369
Blog Entries: 54

Rep: Reputation: 2870Reputation: 2870Reputation: 2870Reputation: 2870Reputation: 2870Reputation: 2870Reputation: 2870Reputation: 2870Reputation: 2870Reputation: 2870Reputation: 2870
It's the damn <CTRL+V CTRL+J>: strings /proc/[pid]/cmdline | xargs (echo (-n)) should do the trick.
 
Old 11-20-2002, 12:58 PM   #5
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,406

Original Poster
Rep: Reputation: 1965Reputation: 1965Reputation: 1965Reputation: 1965Reputation: 1965Reputation: 1965Reputation: 1965Reputation: 1965Reputation: 1965Reputation: 1965Reputation: 1965
ahh super, except for the brackets... i knew that the cmdline "file" was more than just a file with0uot spaces.. but it was more a case of how to format it usefully. cheers.
 
Old 11-20-2002, 01:02 PM   #6
vladkrack
Member
 
Registered: Oct 2002
Location: Curitiba - Brazil
Distribution: Conectiva
Posts: 334

Rep: Reputation: 30
If you want to see it in ps, you could add 'w' s to see longer lines as:

# ps auxwwwwwww
.
.
vladimir 1397 3.0 1.3 3216 1680 tty11 S 16:01 0:00 aterm -bg black - fg gray -tr -sh 30 -title vladterm +sb -sl 5000 -fn -misc-console-medium-r-norma l--16-160-72-72-c-160-iso10646-1 -fb -misc-console-medium-r-normal--16-160-72-72 -c-160-iso10646-1
.
vladimir 1403 0.0 0.7 2776 944 pts/3 R 16:01 0:00 ps auxwwww

hope that fits
 
Old 11-20-2002, 01:37 PM   #7
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,406

Original Poster
Rep: Reputation: 1965Reputation: 1965Reputation: 1965Reputation: 1965Reputation: 1965Reputation: 1965Reputation: 1965Reputation: 1965Reputation: 1965Reputation: 1965Reputation: 1965
ahh two w's also make it wrap better.
 
  


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
find out make and model of pc from command line? box_l Programming 7 02-13-2005 01:34 PM
Can't find command line barbra Linux - Newbie 3 12-28-2004 02:17 PM
Can't find edit grub.conf when im in command line. izac5 Linux - Newbie 7 11-16-2004 04:24 PM
find and replace in files from command line dexter_modem Linux - General 4 06-10-2003 11:27 AM
How to find the command line to launch app ScreeminChikin Linux - General 2 09-18-2002 11:39 PM


All times are GMT -5. The time now is 11:26 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration