develog

[bash] 쉘 스크립트에서 ftp 연결하기 본문

카테고리 없음

[bash] 쉘 스크립트에서 ftp 연결하기

냐옴 2024. 10. 2. 16:27

 

쉘 스크립트

# -i (Interactive)
# -n (No Auto-login)
# -v (Verbose)

ftp -inv $FTP_HOST $FTP_PORT << EOF
user $FTP_USER $FTP_PASS

lpwd
pwd

bye
EOF

 

콘솔 출력

Connected to myserver.com.
220 (vsFTPd 2.0.5)
331 Please specify the password.
230 Login successful.
Local directory is /Volumes/mydata/project_src
257 "/"
221 Goodbye.
Comments