selfjungle Just another WordPress weblog

29Jan/110

put/get files to/from ftp server non-interactively

I decided to sync my work/home computers' calendar/contact files.

Since I wanted to avoid gmail and other closed solutions, I chose ftp as a transfer method and after some search I found ncftp which does the job.

Now I can issue the get script after login and the put before logout at each machine.

#!/bin/bash
# get files from remote server

ncftpget -u USER -p PASS FTPSERVER /LOCALPATH/ std.ics
ncftpget -u USER -p PASS FTPSERVER /LOCALPATH/ std.vcf
#!/bin/bash
# upload files to remote server

ncftpput -u USER -p PASS FTPSERVER . /LOCALPATH/std.ics
ncftpput -u USER -p PASS FTPSERVER . /LOCALPATH/std.vcf
Tagged as: , Leave a comment
Comments (0) Trackbacks (0)

No comments yet.


Leave a comment

 

No trackbacks yet.