Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

How to compare files on ftp-server and in a folder in Linux?

share|improve this question
3  
how detailed a comparison do you need? –  quack quixote Apr 12 '10 at 10:52
    
i need to compare directory structure (n-level) with <10k files (name,extension,size) so, simple comparison –  alex Apr 12 '10 at 19:01

6 Answers 6

up vote 2 down vote accepted

You can use the jdiff and ftp plugins in jEdit to do this (presuming the target files are text).

share|improve this answer

Try with

$ vimdiff local_file ftp://[user@]machine[:port]/remote_file

For example

$ vimdiff todo.txt ftp://mrucci@192.168.1.68/todo.txt

The password, if needed, can be entered later.

share|improve this answer

You will need to use a bash script and compare file listings in the two places. You will need to make sure that the file listings are consistent so you can compare them.

share|improve this answer

Not the ideal solution, but Total Commander @ wine will do the task.

Other tools: http://en.wikipedia.org/wiki/Comparison_of_file_comparison_tools

share|improve this answer

Could not get meld or kompare to use ftp://...

However if the ftp server is not to big you could use wget --mirror and then do the diff locally, I know it's not the best solution... but it may work.


I have not tried this but there seem to be a possibility to mount the ftp server, using ftpfs or fuse or something like that (see Mounting ftp host to local directory on top of FUSE or HOWTO: mount ftpfs under Linux).

Then you could use the normal diff tools since now the ftp server behaves like a local dir.

share|improve this answer
1  
meld or kompare (or vim with netrw) will have to fetch the file, too, so everything you propose would be local anyway. –  Benjamin Bannier Apr 12 '10 at 12:48

For folders i used Krusader and, with some success, WinSCP over WINE (and, with much more success, with WinSCP in Windows, in another machine, either real or virtual).

Small problems are, Krusader is going to have problems if files are 0 sized. Despite that, everything else work perfect.

In older distros or krusader versions, some dates are going to be shown incorrectly, making it believe local or remote copies are older than their cunterparts, due to time differences between time zones and local and server.

WinSCP is much more robust to deal with differences in time and other things, but it is slower and if path exceds the 256 characters lenght (a windows cronic issue) it is going to crash.

In another machine, you need to mount the Linux folder (via Samba or the VM folder share method) as a disk. That could also helps with the 256 characters path cronic illness on Windows apps.

I know the question is pretty old, but, it is one of the first results on google, so this is my 2 cents of contribution.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.