Ftp command to remove a bunch of files

I can upload files using wget "ftp://user:pass@host/prefix*, but I cannot delete the downloaded files from FTP. Any simple solution for this in a bash script?

+3
source share
4 answers

As WhoSayln and Skilldrick said, you should use ftp to upload files and delete files from the server (if you have permission).

But in your question you say: "I can not delete the downloaded files from FTP." Do you want to delete local files from your computer (those that you just downloaded from the ftp server) or files on a remote server?

If local, then just rm -f filedo it: p

, script ( ), - :

jyzuz@dev:/jean> ftp -n -i remoteserver.com << EOF
> user $username $password
> cd /remote/directory/
> rm filename.txt
> bye
> EOF

? = P

+2

script FTP-, lftp.

Tutorial

+1

You want to use ftpfor this.

0
source

wget is not the command you are looking for. you can use the ftp command. here is a lot of documentation about this;

http://linux.about.com/od/commands/l/blcmdl1_ftp.htm

0
source

Source: https://habr.com/ru/post/1763145/


All Articles