Friday, June 18, 2010

uploading files to web hosting

Got a DreamHost account, evaluating a move there. Preliminary tests with downloads alone. Initially copied files using ftp from our local machine. Then tried sftp from local machine. Finally the fastest way, sftp from our dedicated server - more than 10 Mbps. Some files which were not present on our local machine had to be selectively uploaded. For that, did the following.
ls /local/audio24 > 24.txt
ls /local/audio96 > 96.txt
diff -Bc 24.txt 96.txt > difference.txt
cat difference.txt grep + > onlynot.txt
onlynot.txt thus has only the files in audio96 which are not in audio24

Used this list to make a sftp batch file - find replace + with put, and put the filenames in quotes.
Had to modify it to
-put "filename.mp3"
because without the hyphen in the front, sftp would stop if any of the files were not found.

No comments:

Post a Comment