how do i scp .dotfiles??
m.seaman at infracaninophile.co.uk
Sat Aug 28 10:29:43 UTC 2010
On 28/08/2010 08:02:31, 'Gary Kline' wrote:
> On Fri, Aug 27, 2010 at 09:13:06PM +0200, Polytropon wrote:
>> On Fri, 27 Aug 2010 12:21:12 -0500, Gary Gatten <Ggatten at waddell.com> wrote:
>>> Rename them, copy, then rename them back?
>> Not good for a whole bunch of files; in this case: tar them together,
>> transfer the archive, untar it; rename afterwards if needed. :-)
> If i'm going to rename, say, ~/.Plans to ~/Plans and ~/.HowtoI18 to
> ~/HowtoI18, I may just scp -rp every ~/[.] file. the idea of using
> find to collect a tarball may work.
I've been reading this thread, and I'm somewhat at a loss as to why you
need to rename all of the dotfiles at all, Gary. Dotfiles are just
ordinary files, and programs like find(1), scp(1) or tar(1) will handle
them just like any other file. The only difference is that shells by
default don't include dotfiles in some glob expansions and ls(1) doesn't
include them in directory listings. Of course, either of the above can
be overridden: 'echo * .*' or 'ls -a' will show all files including
The one slightly tricky thing about dealing with dotfiles is the
presence of '..' -- the standard link to the directory above the current
one. If you accidentally include that in a list of directories to
recurse through, then you'll end up affecting a bunch of stuff that
maybe you didn't expect. So long as you are aware of the possibility
it's pretty easy to avoid this problem.
To make a copy of your home directory on tao to a temporary directory on
ethic, personally I'd use rsync(1) [in ports as net/rsync]. Then you
can just do:
% rsync -avx --delete ~/ ethic:/home/kline/
It will default to running over ssh(1), so you need to make sure you can
ssh from tao to ethic before you begin.
The neat thing is that you run that command repeatedly, and each
subsequent time it will copy only what has changed on tao over to ethic.
I see someone has given instructions for setting up anonymous rsync --
that's another possibility, but probably a bit OTT for this particular
job. Anonymous rsync is probably best thought of as a superior
replacement for anonymous FTP.
Dr Matthew J Seaman MA, D.Phil. 7 Priory Courtyard
PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate
JID: matthew at infracaninophile.co.uk Kent, CT11 9PW
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 267 bytes
Desc: OpenPGP digital signature
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20100828/a3f74234/signature.pgp
More information about the freebsd-questions