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 03-31-2016, 06:03 PM   #1
sigint-ninja
Member
 
Registered: Feb 2011
Location: Republic Of Ireland
Distribution: Debian,Centos,Slackware
Posts: 452

Rep: Reputation: 29
red hat command displays very differently on centos7


hi guys

busy reading some material on RHEL7 and im doing exercises and notes etc on a centos7 machine

one command is:
ps -eafxo pid,user,cgroup,args | sort -nk1

in the book their are four neat columns

but when i run the command on my centos7 box i get a lot of garbled information that does make some sense but it almost looks encrypted or something...is this just because of a slight difference between the two OS's...?
 
Old 03-31-2016, 06:30 PM   #2
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,260

Rep: Reputation: 1948Reputation: 1948Reputation: 1948Reputation: 1948Reputation: 1948Reputation: 1948Reputation: 1948Reputation: 1948Reputation: 1948Reputation: 1948Reputation: 1948
It should work just the same, the problem is likely that the output in the example material is trimmed down. The "args" field in that command will print ALL arguments to a command, which for things like ssh, bash, web browsers, etc. can be a LOT and will quickly make the output look like gibberish.
 
Old 03-31-2016, 07:18 PM   #3
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 16,830

Rep: Reputation: 2409Reputation: 2409Reputation: 2409Reputation: 2409Reputation: 2409Reputation: 2409Reputation: 2409Reputation: 2409Reputation: 2409Reputation: 2409Reputation: 2409
you will definitely want to pass that to "less"

or

increase the bash output lines

i think the default is 1024 lines
i set it to 4096 lines

edit your bash user profile
" edit current profile"
 
  


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
Some characters are handled differently by two different Red Hat Servers ganni Red Hat 3 08-19-2009 05:26 PM
Why Firefox displays differently in Linux ismailkimyacioglu Linux - Software 3 03-10-2007 10:12 PM
what command to install red hat? aoeshang Linux - Newbie 19 07-09-2005 12:35 PM
Red Hat 7.2 command j0ck Linux - General 2 11-21-2002 01:18 PM
Red Hat 1st boot displays L krazycow1 Linux - Newbie 11 08-27-2002 03:43 PM


All times are GMT -5. The time now is 02:37 AM.

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