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 |
Tags
- 줄바꿈 문자
- Windows
- 네트워크
- context
- IntelliJ
- profile
- find
- Quartz
- Eclipse
- 단축키
- grep
- VirtualBox
- maVen
- Windows 10
- GIT
- port
- lsof
- plugin
- JavaScript
- ssh
- Mac
- netsh
- tomcat
- resource
- web.xml
- import
- Source
- xargs
- bash
- vscode
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