본문 바로가기
🌐OS/Linux

[Linux] FTP 접속

by inbeom 2023. 8. 27.
728x90

FTP접속

  • sftp 계정@ip주소

파일 보내기 (put)

보낼 파일의 경로와 파일명

  • sftp> put /home/inhatc/work0411/ftptest

파일 가져오기 (get)

자기 계정의 홈으로 가져옴 (/home/inhatc)

  • sftp> get ftptest

파일 만들어서 전송하기

(리다이렉션) [명령어] >> [파일명] 으로 복붙하지 않고 바로 파일로 넣을 수 있다.

  • vi 202145055_20230411
  • last > 202145055_20230411
  • history >> 202145055_20230411
  • df >> 202145055_20230411 전송
  • sftp> put /home/inhatc/work0411/202145055_20230411

scp 명령어를 사용하면 대용량(백업) 데이터를 옮길 때 좋다.

  • scp [옵션] [파일or디렉터리 이름] [원격지_id]@[원격지_ip]:[보낼 경로]

#FileZilla 사용하기

  • FileZilla 클라이언트 제일 왼쪽꺼 설치

호스트: 52.79.74.38 사용자: inhatc 비번: robot86676800 포트: 22

  • 왼쪽의 Local은 현재 PC, 오른쪽의 Remote는 서버

MySQL사이트

데이터베이스에 sql파일 삽입하여 DB생성

schema파일 먼저 넣어서 구조를 만들어줘야함.

  • mysql -u root -p < sakila-schema.sql
  • mysql -u root -p < sakila-data.sql

권한부여

  • grant all privileges on sakila.* to 'inhatcdb'@'localhost';
  • grant all privileges on sakila.* to 'inhatcdb'@'%';
  • grant all privileges on sakila.* to 'root'@'%';

SQL

  • select * from film where title like 'MULAN%';
  • select title, a.film_id, release_year, b.actor_id from film a, film_actor b, actor c where title like 'MULAN%'e and a.film_id = b.film_id and b.actor_id = c.actor_id;
  • select * from actor where actor_id in (44, 75, 157, 181, 199);
728x90

'🌐OS > Linux' 카테고리의 다른 글

[Linux] Shell 프로그램  (0) 2023.08.27
[Linux] Cron 스케줄러  (0) 2023.08.27
[Linux] 데이터베이스 사용  (0) 2023.08.27
[Linux] VirtualHost  (0) 2023.08.27
[Linux] 파일배포 및 관리  (0) 2023.08.27