如何递归列出远程FTP的目录内容 [英] How to list directory content of remote FTP, recursively
问题描述
从远程UNIX FTP服务器下载文件后,要验证您是否已正确下载所有文件。最小化您将在Windows命令提示符下获得与dir / s命令类似的信息。 FTP客户端运行在Windows上。
可悲的是这是为Unix / Linux用户编写的:/ b /
就个人而言,我会安装CYGWIN只是为了让Linux的二进制文件LFTP / RSYNC在windows上工作,因为似乎没有任何与之竞争的东西。
作为@ zadok.myopenid.com
提到了rsync,这似乎是使用CYGWIN的Windows构建版本(如果您设法能够获得ssh最终访问该框)
http: //www.aboutmyip.com/AboutMyXApp/DeltaCopy.jsp
Rsync非常方便,它可以将所有内容与校验和进行比较,并最佳地传输部分更改块。
如果您获得CYGWIN / Linux:
http://lftp.yar.ru/ 是我最喜欢的探索工具。
它可以做几乎所有bash可以做的事,尽管远程。
示例:
$ lftp mirror.3fl.net.au
lftp mirror.3fl.net.au:~> ls
drwxr-xr-x 14 root root 4096 Nov 27 2007 games
drwx ------ 2 root root 16384 Apr 13 2006 lost + found
drwxr-xr-x 15镜子4096 Jul 15 05:20 pub
lftp mirror.3fl.net.au:/> cd games / misc
lftp mirror.3fl.net .au:/ games / misc> find
./
./dreamchess/
./dreamchess/full_game/
./dreamchess/full_game/dreamchess-0.2.0-win32 .exe
./frets_on_fire/
./frets_on_fire/full_game/
./frets_on_fire/full_game/FretsOnFire-1.2.451-macosx.zip
./frets_on_fire/full_game/FretsOnFire -1.2.512-win32.zip
./frets_on_fire/full_game/FretsOnFire_ghc_mod.zip
./gametap_setup.exe
......
lft p mirror.3fl.net.au:/games/misc> du gametap_setup.exe
32442 gametap_setup.exe
lftp mirror.3fl.net.au:/games/misc> du -sh gametap_setup.exe
32M gametap_setup.exe
lftp mirror.3fl.net.au:/games/misc>
After downloading files from a remote UNIX FTP server, you want to verify that you have downloaded all the files correctly. Minimal you will get information similar to "dir /s" command in Windows command prompt. The FTP client runs on Windows.
Sadly this was written for Unix/Linux users :/
Personally, I would install CYGWIN just to get Linux binaries of LFTP/RSYNC to work on windows, as there appears not to be anything that competes with it.
As @zadok.myopenid.com mentioned rsync, this appears to be a windows build for it using CYGWIN ( if you manage to be able to get ssh access to the box eventually )
http://www.aboutmyip.com/AboutMyXApp/DeltaCopy.jsp
Rsync is handy in that it will compare everything with check sums, and optimally transfer partial change blocks.
If you get CYGWIN/Linux:
http://lftp.yar.ru/ is my favorite exploration tool for this.
It can do almost everything bash can do, albeit remotely.
Example:
$ lftp mirror.3fl.net.au lftp mirror.3fl.net.au:~> ls drwxr-xr-x 14 root root 4096 Nov 27 2007 games drwx------ 2 root root 16384 Apr 13 2006 lost+found drwxr-xr-x 15 mirror mirror 4096 Jul 15 05:20 pub lftp mirror.3fl.net.au:/> cd games/misc lftp mirror.3fl.net.au:/games/misc>find ./ ./dreamchess/ ./dreamchess/full_game/ ./dreamchess/full_game/dreamchess-0.2.0-win32.exe ./frets_on_fire/ ./frets_on_fire/full_game/ ./frets_on_fire/full_game/FretsOnFire-1.2.451-macosx.zip ./frets_on_fire/full_game/FretsOnFire-1.2.512-win32.zip ./frets_on_fire/full_game/FretsOnFire_ghc_mod.zip ./gametap_setup.exe ...... lftp mirror.3fl.net.au:/games/misc> du gametap_setup.exe 32442 gametap_setup.exe lftp mirror.3fl.net.au:/games/misc> du -sh gametap_setup.exe 32M gametap_setup.exe lftp mirror.3fl.net.au:/games/misc>
这篇关于如何递归列出远程FTP的目录内容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!