Date: Mon, 7 Feb 2000 00:43:45 -0600 From: Dan Nelson <dnelson@emsphone.com> To: "David W. Leask" <dave@leask.net> Cc: FreeBSD Questions <questions@FreeBSD.ORG> Subject: Re: Alternative to ncftpget/ncftpput Message-ID: <20000207004345.A30962@dan.emsphone.com> In-Reply-To: <NDBBJHMBGELLPJPNKEBKIEDNCFAA.dave@leask.net>; from "David W. Leask" on Sun Feb 6 22:18:30 GMT 2000 References: <NDBBJHMBGELLPJPNKEBKIEDNCFAA.dave@leask.net>
next in thread | previous in thread | raw e-mail | index | archive | help
In the last episode (Feb 06), David W. Leask said: > I'm looking for an alternative to ncftpget and ncftpput. For example, > distributing files via ftp to users home directories on various > machines, running different Unix's, from a script cant be done easily > because $HOME and/or ~/ variables will not be expanded with ncftpput. > Is there an easy way around this that I am missing? (R commands, NFS, > and NIS+ are not options) If you need the ~'s expanded on the local side, a script like this would work: #! /usr/local/bin/zsh set ${~@} exec ncftpput.real $@ If you need ~'s expanded on the _remote_ side and you're running as root, you'll have to keep a local table containing a homedir value for each hostname/username pair that you will be accessing. This is easy: simply fetch /etc/passwd from the remote site and parse it. If you're running the syncer as the destination user (i.e. logging into the remote site as that userid), simply put the file without an absolute path. It'll drop in their home directory automatically, since that's where ftpd puts you when you first log in. -- Dan Nelson dnelson@emsphone.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000207004345.A30962>