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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
11-20-2002, 12:56 PM
|
#1
|
Moderator
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417
|
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....
|
|
|
11-20-2002, 12:59 PM
|
#2
|
Member
Registered: Nov 2002
Location: Halifax, UK
Distribution: Debian
Posts: 36
Rep:
|
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
|
|
|
11-20-2002, 01:17 PM
|
#3
|
Moderator
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417
Original Poster
|
yeah i'd rather have a "proper" way. thanks.
|
|
|
11-20-2002, 01:32 PM
|
#4
|
Moderator
Registered: May 2001
Posts: 29,415
|
It's the damn <CTRL+V CTRL+J>: strings /proc/[pid]/cmdline | xargs (echo (-n)) should do the trick.
|
|
|
11-20-2002, 01:58 PM
|
#5
|
Moderator
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417
Original Poster
|
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.
|
|
|
11-20-2002, 02:02 PM
|
#6
|
Member
Registered: Oct 2002
Location: Curitiba - Brazil
Distribution: Conectiva
Posts: 334
Rep:
|
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
|
|
|
11-20-2002, 02:37 PM
|
#7
|
Moderator
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417
Original Poster
|
ahh two w's also make it wrap better.
|
|
|
All times are GMT -5. The time now is 12:20 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|