LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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, 05:03 PM   #1
sigint-ninja
Member
 
Registered: Feb 2011
Location: Republic Of Ireland
Distribution: Debian,Centos,Slackware
Posts: 508

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, 05:30 PM   #2
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573

Rep: Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142
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, 06:18 PM   #3
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,623

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
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



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 04:26 PM
Why Firefox displays differently in Linux ismailkimyacioglu Linux - Software 3 03-10-2007 09:12 PM
what command to install red hat? aoeshang Linux - Newbie 19 07-09-2005 11:35 AM
Red Hat 7.2 command j0ck Linux - General 2 11-21-2002 12:18 PM
Red Hat 1st boot displays L krazycow1 Linux - Newbie 11 08-27-2002 02:43 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:06 PM.

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
Open Source Consulting | Domain Registration