Notice
Recent Posts
Recent Comments
Link
«   2024/05   »
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31
Archives
Today
Total
05-03 12:40
관리 메뉴

zyint's blog

ftp 명령어 본문

예전글들

ftp 명령어

진트­ 2009. 9. 18. 23:13

리눅스에서 ftp 접속

리눅스 쉘에서 ftp 명령어 뒤에 ftp 사이트 주소를 적어서 FTP 서버에 접속합니다.

$ ftp ftp사이트주소

 

 

 

FTP 내에서의 명령어

(토글) 명령어는 설정 값을 on/off 하는 명령어를 뜻합니다.

 

 

정보 표시

  • rstatus: 서버의 연결 정보를 표시합니다.
  • status: 현재 접속 정보를 표시합니다.
  • system: 서버의 시스템 타입을 출력합니다.
  • help(또는 ?): help: ftp 명령어 목록을 보여줍니다.
  • help 명령어: 명령어에 대한 설명을 볼 수 있습니다.

 

 

로그인

  • user: 새로운 유저 정보를 보냅니다.

 

 

파일 전송 모드 명령어

  • 파일 전송 모드

    • type: 파일 전송 모드를 설정합니다.
      ex) type
            type ascii
            type binary
    • ascii(또는 as): 전송모드를 ascii로 설정합니다.
    • binary(또는 bi): 전송 모드를 binary로 설정합니다.
  • mode: 파일 전송 모드를 설정합니다
  • hash: (토글) 파일 전송시에 전송 상태를 화면에 # 로 출력할지를 설정합니다. (기본값: off)
  • prompt: (토글) interactive mode on/off. on일 경우 파일을 다운로드할 때마다 사용자에게 다운로드 여부를 묻습니다. (기본값: on)
  • restart: restart file transfer at bytecount
  • set: set safe protection level for file transfer
  • private: set private protection level for file transfer
  • protect: set protection level for file transfer
  • struct: set file transfer structure
  • tenex: set tenex file transfer type
  • trace: (토글)  toggle packet tracing

 

 

파일/디렉토리

원격 서버
  • 디렉토리

    • mkdir: 원격 서버에 디렉토리를 만듭니다.
      ex) mkdir 디렉토리명
    • rmdir: 원격 서버의 디렉토리를 삭제합니다.
      ex) rmdir 디렉토리명
  • 파일 정보

    • modtime: 원격 서버 파일의 수정 시간을 출력합니다.
    • pwd: 원격 서버에서의 현재 작업 디렉토리를 출력합니다.
    • size: 원격 서버의 파일 크기를 출력합니다.
  • 파일 목록

    • dir(또는 ls, ls -l): 원격 서버의 디렉토리의 파일 목록을 보여줍니다.
    • mdir(또는 mls): 여러 디렉토리의 파일 목록을 보여줍니다.
    • nlist: 원격 서버 디렉토리에 있는 파일의 이름 목록을 보여줍니다.
  • 파일 다운로드

    • get(또는 recv): 원격 서버의 한 개의 파일을 다운로드 합니다.
      ex) get index.html
    • mget: 원격 서버에서 여러 파일을 다운로드 합니다.
      ex) mget *.html
    • newer: get file if remote file is newer than local file
    • reget: get file restarting at end of local file
  • 파일 업로드

    • put(또는 send): 원격 서버에 한 개의 파일을 업로드 합니다.
      ex) put index.html
    • mput: 원격 서버에 여러 파일을 업로드 합니다.
      ex) mput *.html
  • 파일 삭제

    • delete: 원격 서버의 파일 하나를 삭제합니다
      ex) delete index.html
    • mdelete: 원격서버의 여러개의 파일을 삭제합니다
      ex) mdelete *.html
  • cd: 원격 서버의 작업 디렉토리를 변경합니다.
    ex) cd 디렉토리명
  • rename: 원격 서버 파일 이름을 변경합니다.
    ex) rename 현재파일명 바꿀파일명

 

클라이언트
  • lcd: 클라이언트의 작업 디렉토리를 변경합니다.
    ex) lcd 디렉토리명

 

 

서버 연결 및 종료

  • open: 서버에 접속합니다.
    ex) open ftp.nlm.nih.gov
  • proxy: 다른 연결에 명령을 전송합니다.
    ex) proxy open ftp.nlm.nih.gov
          proxy ls -l
  • bye(또는 !, quit): 서버와의 접속을 종료하고, FTP 프로그램을 종료합니다.
  • close(또는 disconnect): 서버와의 접속을 종료하지만, FTP 프로그램은 종료하지 않습니다.
  • sendport: (토글) toggle use of PORT cmd for each data connection
  • passive: (토글) passive 모드 여부를 설정합니다. (기본값: on)

 

 

순수 FTP 명령어

리눅스의 FTP 프로그램의 명령어가 아닌, 순수 FTP 프로토콜의 명령어를 사용할 때 이용하는 명령어들입니다.

  • rhelp: 원격 서버로부터 ftp 명령어 도움말을 받습니다.
  • site:  send site specific command to remote server. Try "rhelp site" or "site help" for more information

 

 

기타 명령어

명령어 설명
$ 매크로를 실행합니다.
account "account" 명령어를 원격 서버에 보냅니다.
append append to a file
bell 명령어 완료시에 벨소리를 나게 합니다.
case toggle mget upper/lower case id mapping
ccc set clear protection level for commands
cdup 원격 서버의 작업 디렉토리를 부모 디렉토리로 변경합니다.
chmod 원격 서버 파일의 퍼미션을 변경합니다
ex) chmod 755 index.html
clear set clear protection level for file transfer
cprotect set protection level for commands
cr toggle carriage return stripping on ascii gets
debug toggle/set debugging mode
form set file transfer format
glob toggle metacharacter expansion of local file names
idle get (set) idle timer on remote side
image set binary transfer type
macdef 매크로를 정의합니다.
nmap set templates for default file name mapping
ntrans set translation table for default file name mapping
quote send arbitrary ftp command
runique toggle store unique for local files
sunique toggle store unique on remote machine
umask get (set) umask on remote side
verbose toggle verbose mode
   

 

 

 

이 글은 스프링노트에서 작성되었습니다.

Comments