Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- Mac
- import
- resource
- Source
- find
- DB 도메인
- port
- copy-dependencies
- 네트워크
- xargs
- netsh
- GIT
- IntelliJ
- 단축키
- profile
- ssh
- Windows
- grep
- bash
- 공통표준용어
- lsof
- tomcat
- Quartz
- web.xml
- JavaScript
- VirtualBox
- context
- Eclipse
- maVen
- Windows 10
Archives
- Today
- Total
develog
[bash] tar 사용하기 본문
옵션
-c, --create create a new archive
-r, --append append files to the end of an archive
-t, --list list the contents of an archive
-x, --extract, --get extract files from an archive
-C, --directory=DIR change to directory DIR
-v, --verbose verbosely list files processed
-f, --file=ARCHIVE use archive file or device ARCHIVE
-T, --files-from=FILE get names to extract or create from FILE
파일 압축하기
## html 디렉토리를 tar 로 압축하기
tar cvf aa.tar html/
## 파일 여러 개를 tar 로 압축하기
tar cvf aa.tar favicon.ico favicon.png
압축을 풀지 않고 파일 목록 확인하기
## tar 파일에 있는 파일 목록 확인하기
tar tvf aa.tar
기존 tar 파일에 파일 추가하기
## 기존 tar 파일에 파일 추가하기
tar rvf aa.tar favicon.png
tar 파일 풀기
## tar 파일 전체 풀기
tar xvf aa.tar
tar 파일에서 특정 파일만 추출하기
## tar 파일에서 특정 파일만 추출하기
tar xvf aa.tar favicon.png
텍스트 파일에 있는 목록만 압축하기
tar cvf aa.tar -T file.txt
Comments