Skip to content

Instantly share code, notes, and snippets.

@AgungPambudi
Created December 4, 2019 04:46
Show Gist options
  • Save AgungPambudi/92b183148a22a8017a0657d274e26b41 to your computer and use it in GitHub Desktop.
Save AgungPambudi/92b183148a22a8017a0657d274e26b41 to your computer and use it in GitHub Desktop.
bash script to remove file from FTP
#!/bin/bash
#title : autoremove_ftp_file.sh
#description : bash script to remove file from FTP.
#author : Agung Pambudi
#website : http://agungpambudi.com
#email : mail@agungpambudi.com
#version : 0.1
#requirement : apt-get install ncftp
#==============================================================================
#
# _ _ _
# ___ ___ _ _ ___ ___ ___ ___ _____| |_ _ _ _| |_| ___ ___ _____
#| .'| . | | | | . | . | .'| | . | | | . | |_| _| . | |
#|__,|_ |___|_|_|_ | _|__,|_|_|_|___|___|___|_|_|___|___|_|_|_|
# |___| |___|_|
ncftp <<EOF
open -u username -p password 192.168.12.180
cd "/home/ftp/data/gfile/MNT"
rm -fr *.*
bye
EOF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment