Yummy Software
Yummy FTP => Yummy FTP Talk => Topic started by: Christian Roth on December 27, 2007, 02:22:41 PM
-
Hi,
I often need to know the (accumulated) size of a folder. I noticed that calculating the accumulated size of a folder is much slower in YummyFTP than it is e.g. in Interarchy. I checked the commands used by both and it seems like YFTP is actively descending the folder hierarchy, whereas Interarchy tries a "LIST -a -R" on a folder first, which - when supported - gives it a recursive file and folder listing with a single, fast command. Is there a way to have YFTP try that command (and parse its output) at first when calculating sizes for a folder?
Also, it would be great to have an (optional) function "calculate sizes in background" (like in the Finder), where YFTP would recursively fetch the size information for the current FTP connection and update (and cache) the file and folder size display in its windows.
Is any of the above possible right now already? I searched the preferences and connection options, but haven't found any respective option so far.
Thanks, kris.
-
I know about the recursive LIST mode, but have not yet added support for it since it is non-standard and not widely supported. However, it would make an exceptionally quicker calculation time and shouldn't be too hard to implement, so I'll prioritize this for an update.
An automatic 'Calculate sizes' option could be added. It is not there right now. Thanks for the suggestion!
-
I have now added recursive LIST mode support ;D
In developing this, I didn't see a good way to reliably detect when the recursive mode was not supported, so I have instead added an option to use recursive LIST mode on a per Bookmark basis, and for maximum compatibility it is off by default.
Note that for servers that do support this mode, Yummy will take advantage of the speed up for all operations which require fetching the server directory structure - eg, download, sychs, as well as calculate size. There is quite a significant speed up for all these operations.
-
How will we know if we try LIST and it is not supported? Will a message appear or will we just get nothing? Or will Yummy realize it isn't getting a response and then default to recursively fetching directory listings? -- but if that were the case you could have it ON by default.
Thanks.
-
The response when a server does not support recursive LIST mode is undefined, therefore I could not make it automatic. I saw a wide variation of behavior. Some just ignored it, others gave no listing data at all. None sent an error back, but I would imagine that should be possible too. It seems too vague for me to add anything intelligent.
If your server supports the recursive LIST mode, you will see in the transcript that Yummy issues the command LIST -R and the server will respond with a hierarchal listing of the entire directory structure. Unix based FTP servers should support it as it's standard command line syntax. Some Windows FTP servers support it, for example Serv-U. I guess it's a case of suck it and see :)
Also, this is only supported by FTP, not SFTP.
-
Thanks, very helpful.
J
-
Also, this is only supported by FTP, not SFTP
Is there a way to have an equivalent for SFTP? I am faced having to delete a huge nested folder structure with just a single file at each folder leaf, and the log tells me that with SFTP, YFTP does a ls for each folder in that tree, which takes ages. It's about 4000 top-level folders, each about 4 hierarchies deep, with a file at that end, and that 4 times.
I am getting a count of about two files/second in the "preparing for deletion step", so it is (probably) way more than half an hour just to prepare.
For this server, I am restricted to sFTP (i.e. no FTP, nor sFTP with TLS/SSL etc.)
Thanks,
Christian
-
Use the 'remote delete' feature to have the server perform the deletion. :)
Transfer menu -> Remote Shell Commands -> Delete
-
Thanks - it would have been cool... ;)
Unfortunately, it did not work for me. I established a connection using SFTP to the server. Then, I went to Transfer > Server Shell Commands > Delete and got the following error: "This service allows sftp connections only." (even though I was logged in using SFTP)
I logged into the server using the OS X Terminal and tried it with the sftp command. The 'help' in it only listed 'rm' and 'rmdir' (but no options like for some other commands), and I was also not successful in doing a recursive deletion using those commands. Could it be that this server simply does not support any recursive deletion commands?
Thanks,
Christian
-
In fact, Yummy doesn't establish an SFTP connection for these tasks, it simply establishes a remote secure shell (SSH) connection and issues the appropriate commands from there.
By the sounds of it your server is prohibiting SSH connections, instead only allowing SFTP connections.
It's the first I ever saw that, but the only explanation I can think of :-\
Can you connect via ssh to the server and see what happens?