When you host your web site remotely and use the open source software’s like wiki, phpbb etc uploading them is pain from UNIX or Linux based computer, especially when these software releases new security fixes you need to upload bunch of files and subdirectories. ncftpget client program is neat handy utility for recursive remote ftp server uploading purpose.
Try ncftpput as follows:
$ ncftpput –R –v –u "username" ftp.nixcraft.biz /nixcraft/forum /tmp/phpbb
-u "username" : Ftp server username
-v : Verbose i.e. show upload progress
-R : Recursive mode; copy whole directory trees.
ftp.nixcraft.biz : Remote ftp server
/nixcraft/forum : Remote ftp server directory where all files and subdirectories will be uploaded
/tmp/phpbb : Local directory (or list of files) to upload remote ftp server directory /nixcraft/forum
1) See ftptreeupload.bash script to copy all files and subdirectories recursively and upload them to remote FTP server (copy local all directories/tree to remote ftp server)
2) ncftpput can be downloaded from http://www.ncftp.com/ncftp/ and works with FreeBSD, Solaris and all most all UNIX variant
Featured Articles:
- 20 Linux System Monitoring Tools Every SysAdmin Should Know
- 20 Linux Server Hardening Security Tips
- Linux: 20 Iptables Examples For New SysAdmins

- My 10 UNIX Command Line Mistakes
- 25 PHP Security Best Practices For Sys Admins
- The Novice Guide To Buying A Linux Laptop
- Top 5 Email Client For Linux, Mac OS X, and Windows Users
- Top 20 OpenSSH Server Best Security Practices
- Top 10 Open Source Web-Based Project Management Software
Facebook it - Tweet it - Print it -
We're here to help you make the most of sysadmin work. So, subscribe!

{ 5 comments… read them below or add one }
Thanks for this – saved me an age.
Just for those who dont work it out themselves, you can not copy and paste the command line as the – (minus/dash) sign is not the correct type. You will need to replace them with a dash from your keyboard. Something to do with the way the web formats them I guess.
Jupp, saved my day uploading 300GB of data to a new repository with only ftp available…
Works fine with symbolic link in the filesystem.
+1 for SamTronik, just type manually.
-R -v -u and so on..
Can we also provide password in same command ?
If yes..How to do that ?
I want to use this in my script.
Hi, I am trying to upload a wordpress folder which contains some sub folders… but your command uploads everything in the root folder and is not creating any folders. …