In the curl command we can delete,rename and move files from a FTP server using Curl like in the command below:

curl -v -u username:pwd ftp://host/FileTodelete -Q "DELE FileTodelete"

Can we untar or unzip files like this way ? I mean that instead of DELE FileTodelete we put a untar/unzip command to extract a file in a remote server?


1 Answer 1


No, in general this isn't possible.

A FTP server usually has commands to get information about files and directories and to store, retrieve, delete and rename files. Commands to mount devices and to send messages to users are also standardized but not implemented in current servers. See the list of FTP commands on Wikipedia for details. No RFC mentions a command to extract files from an archive file.

It may be possible that some servers implement unzipping via the SITE command or a proprietary command, but in general you either need to extract the files on your local machine and send them uncompressed or use another protocol like SSH to execute unzip/untar.

  • I asked this kind of question because sometime I dont have SSH access. thank you
    – Spartan
    Apr 27, 2016 at 19:52

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .