-
-
Save naoyes/8931919 to your computer and use it in GitHub Desktop.
tar(1) でアーカイブ前の名前ではなく新たな名前のディレクトリで展開したいときのメモ ref: http://qiita.com/naoyes/items/a218a137b1a978ef59ce
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $ mkdir after2 && tar xzvf dummy.tgz -C after2 --strip-components 2 | |
| before/one/two1 | |
| before/one/two/ | |
| before/one/two/three/ | |
| $ tree after2 | |
| after2 | |
| ├── two | |
| │ └── three | |
| └── two1 | |
| 2 directories, 1 file |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -C, --directory=DIR | |
| change to directory DIR | |
| --strip-components=NUMBER | |
| strip NUMBER leading components from file names on extraction |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment