[comp.windows.x] ftp'ing from expo

jim@EXPO.LCS.MIT.EDU (Jim Fulton) (05/28/88)

Please avoid ftp'ing from expo.lcs.mit.edu in between the hours of 9am and
6pm east coast, USA time.  

Jim Fulton
MIT X Consortium

raveling@venera.isi.edu.UUCP (06/01/88)

In article <8805272018.AA22868@EXPO.LCS.MIT.EDU> jim@EXPO.LCS.MIT.EDU (Jim Fulton) writes:
>Please avoid ftp'ing from expo.lcs.mit.edu in between the hours of 9am and
>6pm east coast, USA time.  
>
>Jim Fulton
>MIT X Consortium

	As I see it the main reason for not doing this is crummy
	network performance, with negligible bandwidth in "prime time".
	I question whether it's appropriate for the X Consortium
	to discourage public domain distribution of X.

	Wouldn't it be more appropriate to attempt to support
	the ability of X users to import software during their
	own working hours?
	
	Would it help to direct part of the X Consortium's revenue
	toward purchase of disk capacity to keep X at additional
	cooperating sites?  This might help if sites were carefully
	chosen to place a server within as many subnets as possible,
	to avoid gateway bottlenecks and to distribute overall load
	among more servers and more subnets.  Perhaps it would be
	appropriate for the Open Software Foundation to participate
	in this sort of support.

	BTW, I've never been able to connect to decwrl.dec.com
	during the day.  Delay is always so high that either the
	initial connection or the login process times out.  Perhaps
	it's "protected" from our subnet by a cascade of slow gateways.


---------------------
Paul Raveling
Raveling@vaxa.isi.edu

RWS@ZERMATT.LCS.MIT.EDU (Robert Scheifler) (06/03/88)

    Date: 31 May 88 21:50:28 GMT
    From: trwrb!aero!venera.isi.edu!raveling@bloom-beacon.mit.edu  (Paul Raveling)

    I question whether it's appropriate for the X Consortium
    to discourage public domain distribution of X.

(Most of it isn't public domain :-) We are hardly discouraging it.  I
think we go to considerable effort to encourage it.  We're simply asking
you to cooperate in making our working hours more productive.

    Wouldn't it be more appropriate to attempt to support
    the ability of X users to import software during their
    own working hours?

We ask for cooperation.  If you can't supply it or refuse to try, ftp
whenever you can.  We're not likely to blow away ftp connections (too
often).

    Would it help to direct part of the X Consortium's revenue
    toward purchase of disk capacity to keep X at additional
    cooperating sites?

It might help, but it won't happen.  There are a few thousand other
things that such money would be better spent on.

brooks@maddog.llnl.gov (Eugene D. Brooks III) (06/03/88)

In article <6162@well.UUCP> Jef Poskanzer <jef@lbl-rtsg.arpa> writes:
>Hey Paul, perhaps it would be appropriate for you to learn how to ftp
>from a batch job.
Please post the directions to do this!  I have been wanting to ftp
in batch mode for some time and have never figgured it out.

sweet@scubed.UUCP (Kevin Sweet) (06/04/88)

In article <8122@lll-winken.llnl.gov> brooks@maddog.UUCP (Eugene D. Brooks III) writes:
>In article <6162@well.UUCP> Jef Poskanzer <jef@lbl-rtsg.arpa> writes:
>>Hey Paul, perhaps it would be appropriate for you to learn how to ftp
>>from a batch job.
>Please post the directions to do this!  I have been wanting to ftp
>in batch mode for some time and have never figgured it out.

I don't see any smiley's here so (here's something better than a 
moderate flame :-):

I wrote a shell script to automate (anonymous) ftp'ing. I got the 
andrew toolkit this way. (Just nohup the beast.)

#---cut here---cut here---cut here---cut here---cut here---cut here---
#! /bin/sh
# This is a shell archive, meaning:
#     1. Remove everything above the #! /bin/sh line.
#     2. Save the resulting text in a file.
#     3. Execute the file with /bin/sh (not csh) to create:
#        aftp
# This archive created: Fri Jun  3 12:03:48 PDT 1988
#
echo shar: extracting "aftp" '(2851 characters)'
if test -f aftp
then
  echo shar: will not over-write existing file "aftp"
else
sed 's/^XX//' << \SHAR_EOF > aftp
XX#!/bin/sh
XX# usage: aftp [-a|b|t] [-h host] [-d [rdir]] [rdir] rfile [lfile]
XX#
XX# where: [-a|b|t] 	selects (a)scii, (b)inary, or (t)enex transfer
XX#			ascii is the default
XX#        [-h host]	is the host name to ftp from
XX#        [-d [rdir]]	is the remote directory name to get files from
XX#			[rdir] defaults to .
XX#			if you don't select any files, you get a 
XX#			directory listing 
XX#			(e.g., aftp -h expo.lcs.mit.edu -d pub/X.V11R2)
XX#        [rdir]		is the remote directory name to get files from
XX#        rfile		is the remote file to get (or mget)
XX#			(e.g., aftp -t -h expo.lcs.mit.edu 
XX#			            pub/X.V11R2/contrib.hc '*.split.*')
XX#        [lfile]	is the (optional) local filename
XX#			(e.g., aftp -t -h expo.lcs.mit.edu contrib 
XX#			            pbm.tar.Z poskbitmaps.t.Z)
XX#
XX# author: Kevin Sweet [sweet@scubed.arpa]
XX#
XX
XXPATH=/bin:/usr/bin:/usr/ucb
XXProgram=`basename $0`
XXNetrc=${HOME}/.netrc
XXrm -f $Netrc
XX
XXHost=$HOST
XXLogin="anonymous"
XXPassword="guest"
XXTransfer="ascii"
XXDir= Ddir= Local= Remote= 
XXwhile test $# != 0
XXdo	case "$1" in
XX	-l)	case "$2" in
XX		-*|"")	;;
XX		*)	Login="$2" ; shift ;;
XX		esac ;;
XX	-l*)	Login=`expr $1 : '-.\(.*\)'` ;;
XX	-p)	case "$2" in
XX		-*|"")	;;
XX		*)	Password="$2" ; shift ;;
XX		esac ;;
XX	-p*)	Password=`expr $1 : '-.\(.*\)'` ;;
XX	-h)	case "$2" in
XX		-*|"")	;;
XX		*)	Host="$2" ; shift ;;
XX		esac ;;
XX	-h*)	Host=`expr $1 : '-.\(.*\)'` ;;
XX	-d)	case "$2" in
XX		-*|"")	Ddir="." ;;
XX		*)	Ddir="$2" ; shift ;;
XX		esac ;;
XX	-d*)	Ddir=`expr $1 : '-.\(.*\)'` ;;
XX	-a*)	Transfer="ascii" ;;
XX	-b*)	Transfer="binary" ;;
XX	-t*)	Transfer="tenex" ;;
XX	-*)	;;
XX	*)	if test "$Dir" = ""; then
XX			Dir="$1" ; 
XX		elif test "$Remote" = ""; then
XX			Remote="$1" ; 
XX		else
XX			Local="$1" ; 
XX		fi ;; 
XX	esac
XX	shift
XXdone
XXif test "$Ddir" != ""; then
XX	Local="$Remote"
XX	Remote="$Dir"
XX	Dir="$Ddir"
XXfi
XX
XXListing= 
XXif test "$Host" = ""; then
XX	echo -n 'usage: '$Program' [-a|b|t] [-h host] [-d [rdir]] '
XX	echo '[rdir] rfile [lfile]'
XX	exit 0
XXelif test "$Remote" = ""; then
XX	if test "$Ddir" = ""; then
XX		echo -n 'usage: '$Program' [-a|b|t] [-h host] '
XX		echo '[-d [rdir]] [rdir] rfile [lfile]'
XX		exit 0
XX	else
XX		Listing=yes
XX	fi
XXfi
XX
XXif test `echo $Remote | grep -c '*'` -ne 0; then
XX	Get="mget"
XX	Local= 
XXelif test `echo $Remote | grep -c '?'` -ne 0; then
XX	Get="mget"
XX	Local= 
XXelif test `echo $Remote | grep -c '\['` -ne 0; then
XX	Get="mget"
XX	Local= 
XXelse
XX	Get="get"
XX	if test "$Local" = ""; then
XX		Local="$Remote"
XX	fi
XXfi
XX
XXecho "machine $Host, login $Login, password $Password" > $Netrc
XXchmod 600 $Netrc
XX	if test "$Listing" = "yes"; then
XXecho listing of directory $Dir on $Host:
XXftp -v $Host << END_FTP
XXcd $Dir
XXdir
XXbye
XXEND_FTP
XX	else	# listing
XXdate
XXecho -n $Transfer transfer of $Host::$Dir/$Remote
XXif test "$Get" = "get"; then
XX	echo ' to '$Local':'
XXelse
XX	echo :
XXfi
XXftp -v -i $Host << END_FTP
XX$Transfer
XXcd $Dir
XX$Get $Remote $Local
XXbye
XXEND_FTP
XXecho ' '
XX	fi	# listing
XXrm -f $Netrc
XX
XXexit 0
SHAR_EOF
if test 2851 -ne "`wc -c < aftp`"
then
  echo shar: error transmitting "aftp" '(should have been 2851 characters)'
fi
fi # end of overwriting check
#
# End of shell archive
exit 0

-- 
Kevin Sweet ---------------------------------- sweet%kelvin@scubed.arpa
S-CUBED, 3398 Carmel Mountain, San Diego, CA 92121-1095,  (619)587-8499
UUCP:    [harvard,ihnp4!ames,rutgers,ucsd,uunet]scubed!kelvin!sweet
DECNET:  SDSC::"SWEET@S3VAX.SPAN" , 1.312::SWEET

nobody@scubed.UUCP (anonymous NFS user) (06/10/88)

Well, my insidious Trojan Horse ``aftp'' has managed to blast at least
two people's already existing .netrc files. :-( 
Here is another copy that won't do that but look at the caveat line 
anyway...

	- Kevin

#---cut here---cut here---cut here---cut here---cut here---cut here---
#! /bin/sh
# This is a shell archive, meaning:
#     1. Remove everything above the #! /bin/sh line.
#     2. Save the resulting text in a file.
#     3. Execute the file with /bin/sh (not csh) to create:
#        aftp
# This archive created: Thu Jun  9 16:55:21 PDT 1988
#
echo shar: extracting "aftp" '(3097 characters)'
if test -f aftp
then
  echo shar: will not over-write existing file "aftp"
else
sed 's/^XX//' << \SHAR_EOF > aftp
XX#!/bin/sh
XX# usage: aftp [-a|b|t] [-h host] [-d [rdir]] [rdir] rfile [lfile]
XX#
XX# where: [-a|b|t] 	selects (a)scii, (b)inary, or (t)enex transfer
XX#			ascii is the default
XX#        [-h host]	is the host name to ftp from
XX#        [-d [rdir]]	is the remote directory name to get files from
XX#			[rdir] defaults to .
XX#			if you don't select any files, you get a 
XX#			directory listing 
XX#			(e.g., aftp -h expo.lcs.mit.edu -d pub/X.V11R2)
XX#        [rdir]		is the remote directory name to get files from
XX#        rfile		is the remote file to get (or mget)
XX#			(e.g., aftp -t -h expo.lcs.mit.edu 
XX#			            pub/X.V11R2/contrib.hc '*.split.*')
XX#        [lfile]	is the (optional) local filename
XX#			(e.g., aftp -t -h expo.lcs.mit.edu contrib 
XX#			            pbm.tar.Z poskbitmaps.t.Z)
XX#
XX# caveats: there's no checking for interrupts that may cause your 
XX#          .netrc file to be left as an orphan named ``.aftp.$$''
XX#
XX# author: Kevin Sweet [sweet@scubed.arpa]
XX#
XX
XXPATH=/bin:/usr/bin:/usr/ucb
XXProgram=`basename $0`
XXNetrc=${HOME}/.netrc
XX
XXHost=$HOST
XXLogin="anonymous"
XXPassword="guest"
XXTransfer="ascii"
XXDir= Ddir= Local= Remote= 
XXwhile test $# != 0
XXdo	case "$1" in
XX	-l)	case "$2" in
XX		-*|"")	;;
XX		*)	Login="$2" ; shift ;;
XX		esac ;;
XX	-l*)	Login=`expr $1 : '-.\(.*\)'` ;;
XX	-p)	case "$2" in
XX		-*|"")	;;
XX		*)	Password="$2" ; shift ;;
XX		esac ;;
XX	-p*)	Password=`expr $1 : '-.\(.*\)'` ;;
XX	-h)	case "$2" in
XX		-*|"")	;;
XX		*)	Host="$2" ; shift ;;
XX		esac ;;
XX	-h*)	Host=`expr $1 : '-.\(.*\)'` ;;
XX	-d)	case "$2" in
XX		-*|"")	Ddir="." ;;
XX		*)	Ddir="$2" ; shift ;;
XX		esac ;;
XX	-d*)	Ddir=`expr $1 : '-.\(.*\)'` ;;
XX	-a*)	Transfer="ascii" ;;
XX	-b*)	Transfer="binary" ;;
XX	-t*)	Transfer="tenex" ;;
XX	-*)	;;
XX	*)	if test "$Dir" = ""; then
XX			Dir="$1" ; 
XX		elif test "$Remote" = ""; then
XX			Remote="$1" ; 
XX		else
XX			Local="$1" ; 
XX		fi ;; 
XX	esac
XX	shift
XXdone
XXif test "$Ddir" != ""; then
XX	Local="$Remote"
XX	Remote="$Dir"
XX	Dir="$Ddir"
XXfi
XX
XXListing= 
XXif test "$Host" = ""; then
XX	echo -n 'usage: '$Program' [-a|b|t] [-h host] [-d [rdir]] '
XX	echo '[rdir] rfile [lfile]'
XX	exit 0
XXelif test "$Remote" = ""; then
XX	if test "$Ddir" = ""; then
XX		echo -n 'usage: '$Program' [-a|b|t] [-h host] '
XX		echo '[-d [rdir]] [rdir] rfile [lfile]'
XX		exit 0
XX	else
XX		Listing=yes
XX	fi
XXfi
XX
XXif test `echo $Remote | grep -c '*'` -ne 0; then
XX	Get="mget"
XX	Local= 
XXelif test `echo $Remote | grep -c '?'` -ne 0; then
XX	Get="mget"
XX	Local= 
XXelif test `echo $Remote | grep -c '\['` -ne 0; then
XX	Get="mget"
XX	Local= 
XXelse
XX	Get="get"
XX	if test "$Local" = ""; then
XX		Local="$Remote"
XX	fi
XXfi
XX
XXif test -f $Netrc ; then mv $Netrc .aftp.$$ ; fi
XXecho "machine $Host, login $Login, password $Password" > $Netrc
XXchmod 600 $Netrc
XX	if test "$Listing" = "yes"; then
XXecho listing of directory $Dir on $Host:
XXftp -v $Host << END_FTP
XXcd $Dir
XXdir
XXbye
XXEND_FTP
XX	else	# listing
XXdate
XXecho -n $Transfer transfer of $Host::$Dir/$Remote
XXif test "$Get" = "get"; then
XX	echo ' to '$Local':'
XXelse
XX	echo :
XXfi
XXftp -v -i $Host << END_FTP
XX$Transfer
XXcd $Dir
XX$Get $Remote $Local
XXbye
XXEND_FTP
XXecho ' '
XX	fi	# listing
XX
XXrm -f $Netrc
XXif test -f .aftp.$$ ; then mv -f .aftp.$$ $Netrc
XXelse rm -f .aftp.$$ ; fi
XX
XXexit 0
SHAR_EOF
if test 3097 -ne "`wc -c < aftp`"
then
  echo shar: error transmitting "aftp" '(should have been 3097 characters)'
fi
fi # end of overwriting check
#
# End of shell archive
exit 0
Kevin Sweet ---------------------------------- sweet%kelvin@scubed.arpa
S-CUBED, 3398 Carmel Mountain, San Diego, CA 92121-1095,  (619)587-8499
UUCP:    [harvard,ihnp4!ames,rutgers,ucsd,uunet]scubed!kelvin!sweet
DECNET:  SDSC::"SWEET@S3VAX.SPAN" , 1.312::SWEET