Difference between revisions of "Linux hints"

From Klaus' wiki
Jump to: navigation, search
(Created page with 'To compare two file of which one resides on another system issue this command: <source lang="bash"> vim -d <firstfile> scp://<remote-system>//<path-to-file>/<secondfile> </sourc…')
 
Line 1: Line 1:
To compare two file of which one resides on another system issue this command:
+
=== Comparing two files ===
 +
In general comparing two files can be done like this:
 +
 
 +
<source lang="bash">
 +
diff <firstfile> <secondfile>
 +
</source>
 +
 
 +
To compare two files of which one resides on another system issue this command:
  
 
<source lang="bash">
 
<source lang="bash">
 
vim -d <firstfile> scp://<remote-system>//<path-to-file>/<secondfile>
 
vim -d <firstfile> scp://<remote-system>//<path-to-file>/<secondfile>
 
</source>
 
</source>
 +
 +
To compare two files both resident on different systems issue this command:
 +
 +
<source lang="bash">
 +
vim -d scp://<first-remote-system>//<path-to-file>/<firstfile> scp://<second_remote-system>//<path-to-file>/<secondfile>
 +
</source>
 +
 +
where <remote-system> is either the IP address or its hostname including domain as in bren.hih.au.dk

Revision as of 09:03, 30 June 2010

Comparing two files

In general comparing two files can be done like this:

diff <firstfile> <secondfile>

To compare two files of which one resides on another system issue this command:

vim -d <firstfile> scp://<remote-system>//<path-to-file>/<secondfile>

To compare two files both resident on different systems issue this command:

vim -d scp://<first-remote-system>//<path-to-file>/<firstfile> scp://<second_remote-system>//<path-to-file>/<secondfile>

where <remote-system> is either the IP address or its hostname including domain as in bren.hih.au.dk