Unix 공통 / 참고 사이트
[Unix] tar 절대경로 상대경로로 풀기
짜꾸미의골골몽
2010. 10. 1. 16:28
pax -r -s ',^/usr/local/secuplatesm/procsvr/cron,ps_cron_test/test,' -f ps_cron.tar
pax -r -s ',^//기존경로///,///풀 경로///,' -f 파일명.tar
pax -r -s ',^/,,' -l -p e -f 해당file.tar
- 풀 경로에서 실시하게되면 해당 디렉토리부터 절대경로 디렉토리로 압축 해제
[v480:/tmp/leeky/tar_test]#tar tvf *
tar: blocksize = 11
-rwxr-xr-x 0/0 2560 4월 9 16:08 2010 /tmp/leeky/db.sh
-rwxr-xr-x 0/0 564 4월 9 11:03 2010 /tmp/leeky/db1.sh
[pax -r -s ',^/tmp/leeky/,/tmp/leeky/1/,' -f test.tar ]