FTP Protocol and Deleting Directories

↘锁芯ラ 提交于 2019-12-04 03:22:50

问题


Filezilla is taking forever to delete a nested directory structure from my website. Why does it have to change into each sub directory and delete files instead of just removing the whole top most directory in one go? Is removing a file the only supported command in the FTP RFC and does recursive directory removal have to be implemented by the client?


回答1:


The FTP RFC (or the Extensions to FTP RFC) does not define any command to recursively delete a directory. You only have the DELE command, defined in section 4.1.3 to delete a file and the way to delete an entire tree using FTP is to recursively delete files and folders (RMD), one by one.




回答2:


Well, unfortunately yes, as per RFC 959 and a more friendly list




回答3:


I recently had this problem, but i used puTTY to delete nested directories.

  1. connect using your FTP username/password
  2. once connected, use rm -rf dir_name to delete the directory


来源:https://stackoverflow.com/questions/1931894/ftp-protocol-and-deleting-directories

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!