에서 문서 , 그 읽고 tar타르에서 파일을 추출 할 때 다음과 같은 옵션이 있습니다 :
-k, --keep-old-files
don't replace existing files when extracting
--overwrite
overwrite existing files when extracting
어떤 것이 기본적으로 사용됩니까?
에서 문서 , 그 읽고 tar타르에서 파일을 추출 할 때 다음과 같은 옵션이 있습니다 :
-k, --keep-old-files
don't replace existing files when extracting
--overwrite
overwrite existing files when extracting
어떤 것이 기본적으로 사용됩니까?
답변:
직접 시도해 볼 수 있습니다.
echo 1 > 1
echo 2 > 2
tar cf foo.tar 1 2
echo 3 > 1
echo 4 > 2
tar xf foo.tar
cat ?
1
2
처음 두 개의 파일 ( 1및 2)이 작성되었습니다. 아카이브 foo.tar가 생성되었습니다. 다음 단계는 파일 내용을 변경 한 후 foo.tar추출되었습니다. 파일을 살펴보면 이전 내용이 표시됩니다.
그래서 --overwrite기본값입니다.