Programming

Unix 압축 시 기존 파일 살리기

touchsoul 2009. 9. 24. 11:02

$ gzip temp_file 원본 파일은 삭제 되고 temp_file.gz 파일만 남는다

$ gunzip temp_file.gz temp_file.gz 파일은 삭제되고 temp_file 파일만 남는다.

   

원본 파일을 살리고 압축하기

$ gzip temp_file -c temp_file > temp_file.gz

   

원본 압축 파일을 살리고 압축풀기

$ gunzip temp_file.gz temp_file.gz > temp_file