Created
December 4, 2019 04:46
-
-
Save AgungPambudi/92b183148a22a8017a0657d274e26b41 to your computer and use it in GitHub Desktop.
bash script to remove file from FTP
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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