본문 바로가기
조회 수 6764 추천 수 0 댓글 0
?

단축키

Prev이전 문서

Next다음 문서

+ - Up Down Comment Print
?

단축키

Prev이전 문서

Next다음 문서

+ - Up Down Comment Print
Upload file/dir with shell script (ftp, lftp, ncftpput)

#########################
# Upload files with ftp
#########################

#!/bin/sh
SERVER=remoteaddr
USER=username
PASSWD=password

ftp -v -n $SERVER <<END_OF_SESSION
user $USER $PASSWD
binary
prompt
lcd /local/dir
mkdir /remote/dir
cd /tmp/test
mput *
bye
END_OF_SESSION

###################################
# Upload files/dirs with ncftpput
###################################

#!/bin/sh
SERVER=remoteaddr
USER=username
PASSWD=password

ncftpput -R -v -u $USER -p $PASSWD -m $SERVER /remote/dir /local/dir

##############################
# Upload files/dirs with lftp
##############################

#!/bin/sh
SERVER=remoteaddr
USER=username
PASSWD=password

lftp -d -u $USER,$PASSWD $SERVER <<EOF
cd /remote/dir
lcd /local/dir
mirror -R
quit 0
EOF


Designed by sketchbooks.co.kr / sketchbook5 board skin

나눔글꼴 설치 안내


이 PC에는 나눔글꼴이 설치되어 있지 않습니다.

이 사이트를 나눔글꼴로 보기 위해서는
나눔글꼴을 설치해야 합니다.

설치 취소

Sketchbook5, 스케치북5

Sketchbook5, 스케치북5

Sketchbook5, 스케치북5

Sketchbook5, 스케치북5