Hi, I am running CentOS 6.4 on a remote server. when i run the below command, it prints out the headers too. is there a way to remove headers using the below command line *top -b -p 22657 > topcpu.txt* Regards, Kaushal
On 24/10/2013 12:20, Kaushal Shriyan wrote:> Hi, > > I am running CentOS 6.4 on a remote server. when i run the below command, > it prints out the headers too. is there a way to remove headers using the > below command line > > *top -b -p 22657 > topcpu.txt* >Perhaps the 'ps' command in a sleep 3 loop is more suited for what you're looking for? -- Regards, Giles Coochey, CCNP, CCNA, CCNAS NetSecSpec Ltd +44 (0) 8444 780677 +44 (0) 7983 877438 http://www.coochey.net http://www.netsecspec.co.uk giles at coochey.net
From: Kaushal Shriyan <kaushalshriyan at gmail.com>> I am running CentOS 6.4 on a remote server. when i run the below command, > it prints out the headers too. is there a way to remove headers using the > below command line > *top -b -p 22657 > topcpu.txt*If you want to stick to top: ? top -b -p 22657 | grep -v '^[a-z ]\|^$' JD