Since I work with the XDA server, I often have to work on stuff in the XDA server, finish it and upload it to my host. Now Goo.im conveniently offers a sftp access, that makes everything very easy. A simple scp command can transfer the file (already descibed elsewhere on my blog). However when it comes to transferring the files via simple ftp, things are a bit different. You need a bash scrip to do it.
I’ve used this script from Ubuntuforums to suit my needs perfectly:
# The next 9 lines are lifted from mickwombat's script #!/bin/sh USERNAME="[email protected]" PASSWORD="myftppassword" SERVER="ftp.droidzone.in" # Directory where file is located DIR=$2 # Filename of backup file to be transfered FILE=$1 # login to ftp server and transfer file curl -T $FILE -u $USERNAME:$PASSWORD $SERVER/$DIR/
This very neatly takes the file specified in the first argument, and transfers it to ftp.droidzone.in/dir where dir is the specified directory.
Joel G Mathew, known in tech circles by the pseudonym Droidzone, is an opensource and programming enthusiast.
He is a full stack developer, whose favorite languages are currently Python and Vue.js. He is also fluent in Javascript, Flutter/Dart, Perl, PHP, SQL, C and bash shell scripting. He loves Linux, and can often be found tinkering with linux kernel code, and source code for GNU applications. He used to be an active developer on XDA forums, and his tinkered ROMS used to be very popular in the early 2000s.
His favorite pastime is grappling with GNU compilers, discovering newer Linux secrets, writing scripts, hacking roms, and programs (nothing illegal), reading, blogging. and testing out the latest gadgets.
When away from the tech world, Dr Joel G. Mathew is a practising ENT Surgeon, busy with surgeries and clinical practise.