[clug] comparing the output of two saved 'ps' listings... 'watch' on saved files vs live cmd - possilbe?

steve jenkin sjenkin at canb.auug.org.au
Fri Dec 18 09:54:44 UTC 2015


I’d like to be able to see , in the style of ‘watch’s visual highlighting, the difference between pairs of files, which are captures of the ‘ps -ef’ (or 'ps aux' for the BSD ppl).

I’m primarily looking for a command-line / TTY tool, not an X-11/GUI tool.

‘sdiff’ doesn’t quite do it for me … truncates the lines on the left side.
Using the context option of diff (-c) makes things things worse for these files.

In Ubuntu, there’s a package ‘vbindiff’ that may do what I want, but it’s labelled ‘visual binary diff’.
There’s also something called ‘kdiff3’ that I haven’t checked out. [I run KDE, can use it.]

Haven’t tried vimdiff - was put off by it not being a PAGER but editor.

If I can see even parts of the files, I can do something later with the captured ‘ps’ files to break them into pieces so, then compare corresponding pieces, if I can 

I can get close to what I want with ‘watch’ [‘-g’ - exit on a change. ‘-d’ - highlight diffs]


Window 1.
> watch -d -n 5 -g head -30 ps.txt


Window 2.
> cp new-ps ps.txt


Thanks in Advance
steve

--
Steve Jenkin, IT Systems and Design 
0412 786 915 (+61 412 786 915)
PO Box 48, Kippax ACT 2615, AUSTRALIA

mailto:sjenkin at canb.auug.org.au http://members.tip.net.au/~sjenkin




More information about the linux mailing list