Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to list directory content of remote FTP, recursively

Tags:

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.

like image 812
edygunawan Avatar asked Sep 19 '08 00:09

edygunawan


People also ask

How do you list a directory recursively?

Try any one of the following commands to see recursive directory listing: ls -R : Use the ls command to get recursive directory listing on Linux. find /dir/ -print : Run the find command to see recursive directory listing in Linux. du -a . : Execute the du command to view recursive directory listing on Unix.


2 Answers

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>  
like image 148
Kent Fredric Avatar answered Sep 18 '22 13:09

Kent Fredric


Do this :

ls -lR 

..................

like image 42
jamesmar Avatar answered Sep 18 '22 13:09

jamesmar