Compress
tar cf - <files> -P | pv -s $(du -sb <files> | awk '{print $1}') | gzip > <some .tar.gz file>
where:
<files>
is the root-mounted (i.e. starts with /) path to the files<some .tar.gz file>
is the output tarball to create
Decompress
pv <some .tar.gz file> | tar -xvzf - -C <some directory>
where:
<some .tar.gz file>
is the path to the tarball to extract<some directory>
is the directory to extract the tarball to
'서버 | OS > Linux - Shell Script' 카테고리의 다른 글
Send e-mail with attachment in shell environment. (0) | 2024.02.01 |
---|---|
쉘스크립트의 명령행 인자를 파싱하는 방법 (0) | 2023.10.05 |
쉘 환경변수에 행 단위로 텍스트 저장/불러오기. (0) | 2023.10.05 |
Faster bulk(directory) copy than cp, and watch progress (0) | 2023.08.24 |