2022. 7. 20. 17:20ㆍLinux
// 현재 디렉토리에 압축 (c)
tar cvfz 압축후이름.tar.gz 압축할폴더
tar cvfz node_modules.tar.gz ./node_modules
// 현재 디렉토리에 해제 (x)
tar zxvf 압축풀파일.tar.gz
tar zxvf node_modules.tar.gz
.tar는 묶음
.gz는 압축
FileZilla를 통해 tar.gz압축파일을 보낸 뒤 리눅스로 설치
Putty 혹은 MobaXterm을 사용
tar : puts multiple files into a single (tar) file.
-> 많은 파일들을 하나로 묶어주는 데 사용
.gz : compresses one file (only).
-> 하나의 용량이 큰 파일을 압축
>> 그래서 tar.gz는 하나로 묶은 뒤 압축
해당 폴더 내 진입 후 명령어 사용하여 압축풀기 및 설치 진행
// 압축풀기
z : means (un)z̲ip.
-> 압축파일
x : means ex̲tract files from the archive.
-> 압축해제
v : means print the filenames v̲erbosely.
-> 파일명 상세하게 출력
f : means the following argument is a f̱ilename.
-> 파일명 지정
-C : 경로 설정
>> tar -zxvf 파일명 -C 경로
// 압축하기
z : means (un)z̲ip.
-> 압축파일
c : means create a new archive.
-> 해당 파일들을 하나의 파일로 압축
v : means print the filenames v̲erbosely.
-> 파일명 상세하게 출력
f : means the following argument is a f̱ilename.
-> 파일명 지정
>> tar -zcvf 생성할파일명 합칠파일들(*.py처럼 * 사용가능)
앞에 시작하는 명령어에 따라 옵션이 나뉜다
'Linux' 카테고리의 다른 글
The package-lock.json file was created with an old version of npm, (0) | 2022.07.21 |
---|---|
~은 (는) sudoers 설정 파일에 없습니다. 이 시도를 보고합니다. (0) | 2022.07.20 |
CentOS7 EC2 MariaDB 설치 및 삭제(online) (0) | 2022.07.18 |
UBUNTU EC2 내 MongoDB 설치(online) (0) | 2022.07.12 |
UBUNTU EC2 내 초기 express.js 세팅(online) (0) | 2022.07.11 |