I try to delete all files from a directory on a remote FTP server with BASH. I was only able to delete the files and the folder, but not just clearing a folder out.. :/
Linux – Delete all files inside a directory over FTP with BASH
bashftplinux
bashftplinux
I try to delete all files from a directory on a remote FTP server with BASH. I was only able to delete the files and the folder, but not just clearing a folder out.. :/
Best Answer
From the
ftp
man page:So you should be able to connect to your ftp server, navigate to the proper directory, and then
mdelete
the desired files:The
prompt
command tells your ftp client not to ask you for a confirm each time.