aspiredfang
October 10th, 2010, 02:55 PM
I'm going to be moving to China in the coming week and have a need to access my home computer due to some strict Firewall rules on certain sites I have developed (I'm a Web Developer). Access itself via SSH/TOR is all sorted and the like but, now I'm looking to start using some alternative CLI tools for certain tasks I perform; mainly FTP and that what this post is about.
Normally I use Filezilla (as quite simply, it's a great piece of kit) and am now making the transition across to ncftp. Now, I'm quite a beginner when it comes to shell scripting (PHP is my "forte")within *nix having only created the odd script for odd jobs. Recently, I have started reading the bash scripting guide linked to from this forum.
It is however, over 800 pages long! Over time, it will get read but, in order to fast forward a lot of unnecessary reading, please can some of the more experienced programmers help me out with pointers on what to use, an alternative I've missed or even a spot of code for the following:
- Use ncftp(ls) in order to create a directory listing of everything within a set path (var/www/vhosts/xxxx/httpdocs/) including sub directories.
* This step can come later on after this is working but, exclude defined directories and its children.
- Compare that listing against a locally stored structure, which would mirror that of the site...within httpdocs.
- Generate an ncftpput list that only uploads files that have a different file size.
With the above, note I would use scp to put the files on my box back at home (backup purposes also) and want to use the script whilst logged in to it via a shell. There could be a feature for this already and I'm just missing it or a much simpler way even! Any help would be much appreciated, thank you in advance for even reading this post.
Normally I use Filezilla (as quite simply, it's a great piece of kit) and am now making the transition across to ncftp. Now, I'm quite a beginner when it comes to shell scripting (PHP is my "forte")within *nix having only created the odd script for odd jobs. Recently, I have started reading the bash scripting guide linked to from this forum.
It is however, over 800 pages long! Over time, it will get read but, in order to fast forward a lot of unnecessary reading, please can some of the more experienced programmers help me out with pointers on what to use, an alternative I've missed or even a spot of code for the following:
- Use ncftp(ls) in order to create a directory listing of everything within a set path (var/www/vhosts/xxxx/httpdocs/) including sub directories.
* This step can come later on after this is working but, exclude defined directories and its children.
- Compare that listing against a locally stored structure, which would mirror that of the site...within httpdocs.
- Generate an ncftpput list that only uploads files that have a different file size.
With the above, note I would use scp to put the files on my box back at home (backup purposes also) and want to use the script whilst logged in to it via a shell. There could be a feature for this already and I'm just missing it or a much simpler way even! Any help would be much appreciated, thank you in advance for even reading this post.