Never been to DZone Snippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

About this user

James Robertson http://www.r0bertson.co.uk

« Newer Snippets
Older Snippets »
Showing 1-2 of 2 total  RSS 

copy files using rsync and ssh

source: http://www.mikerubel.org/computers/rsync_snapshots/#Abstract ; switches: -a = archive mode -e specifies the remote shell to use

rsync -a -e ssh source/ username@remotemachine.com:/path/to/destination/

Using Ruby to copy a file

Using Ruby this code copies a file called 'notes.xml' to a new file called 'notes2.xml'. Refer to ruby-doc.org - Class: File http://urltea.com/1wbt

require 'ftools'
File.copy('notes.xml', 'notes2.xml')


« Newer Snippets
Older Snippets »
Showing 1-2 of 2 total  RSS