在Java FTP中 - 我们可以使用ftp在远程位置压缩文件,而无需将文件带到本地计算机上? [英] In Java FTP-Can we compress a file in remote location using ftp, without bringing the file to local machine?

查看:325
本文介绍了在Java FTP中 - 我们可以使用ftp在远程位置压缩文件,而无需将文件带到本地计算机上?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们可以使用ftp在远程位置压缩文件,而无需将文件带到本地机器上吗?



我正在做一个POC,在这个POC中,我想压缩一个文本或csv文件位于远程机器,在java中有压缩程序,我用它来压缩位于本地计算机上的文件,
我的要求是我需要在远程位置压缩文件而不将它带到本地机器,是否可以在java中实现?



等待天才的答复

解决方案

检查您的服务器是否支持SITE命令。如果是这样,有可能这些命令以某种方式传递给shell执行,因此给你所需的shell访问权限。否则,没有标准的方法来为您的任务使用FTP协议。

Can we compress a file in remote location using ftp, without bringing the file to local machine?

I am doing a POC , in which i want to compress a text or csv file located in remote machine, In java there is program for compression which i use to compress the files located in local machine, My requirement is i need to compress the file in the remote location without bringing it to the local machine , is it achievable in java?

Awaiting for the reply from the genius

解决方案

Check if your server supports SITE commands. If it does, it is possible that those commands are somehow passed to the shell for execution, thus giving you required shell access. Otherwise there's no standard way to use FTP protocol for your task.

这篇关于在Java FTP中 - 我们可以使用ftp在远程位置压缩文件,而无需将文件带到本地计算机上?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆