parallel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Possible sub-project: put


From: Charles Pritchard
Subject: Possible sub-project: put
Date: Thu, 28 Feb 2013 17:35:16 -0800
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130215 Thunderbird/17.0.3

I just stumbled upon the sql sub-project for parallel, a wrapper for various command line sql utilities.

Today I found the need for a nice wrapper for the various copy utilities. Between wget, curl, rsync, scp and "mkdir", it'd be great to have a wrapper.

One of the more frustrating items with scp and rsync is that they don't create parent directories, so one must do: "[ssh remote] mkdir -p destination/path/file && rmdir destination/path/file" prior to scp.

Here's the kludge ssh-copy-id goes through:

{ eval "$GET_ID" ; } | ssh $1 "umask 077; test -d .ssh || mkdir .ssh ; cat >> .ssh/authorized_keys; test -x /sbin/restorecon && /sbin/restorecon .ssh .ssh/authorized_keys" || exit 1

vs a possible put command:

put ~/.ssh/authorized_keys ssh://remote:~/.ssh/authorized_keys

And for a local user, append and chown:
put -aU otheruser ~/.ssh/authorized_keys /home/otheruser/.ssh/authorized_keys

Anyway, it's a thought.

-Charles




reply via email to

[Prev in Thread] Current Thread [Next in Thread]