06.OS/Linux
[Rocky] 파일 압축 /해제 방법
basicinfo119
2025. 2. 24. 22:17
728x90
반응형
7z 파일 압축 해제 방법
- 압축 해제 방벙
#7z 파일 압축 해제
7z x 파일명.7z
#특정 폴더에 압축 해제
7z x 파일명.7z -o/경로/디렉토리
#압축 해제 시 기존 파일 덮어쓰기 없이 진행
7z x 파일명.7z -o/경로/디렉토리 -aos
#암호가 걸린 7z 파일 압축 해제방법
7z x 파일명.7z -p비밀번호
# 압축된 파일 내부 목록 확인
7z l 파일명.7z
- 에러발생시 팩키지 설치 필요
Last metadata expiration check: 3:26:19 ago on Mon Feb 24 17:53:46 2025.
No match for argument: p7zip
No match for argument: p7zip-plugins Error: Unable to find a match: p7zip p7zip-plugins
No match for argument: p7zip
No match for argument: p7zip-plugins Error: Unable to find a match: p7zip p7zip-plugins
#EPEL 저장소를 활성화
sudo dnf install -y epel-release
#설치
sudo dnf install -y p7zip p7zip-plugins
7z 파일 압축 방법
- 압축 방법
#기본 7z 압축 방법
#7z a 압축파일명.7z 파일명
7z a archive.7z myfile.txt
#여러 개의 파일을 압축
#7z a archive.7z 파일1 파일2 디렉토리
7z a mydata.7z file1.txt file2.txt folder1/
#특정 확장자의 파일만 압축
7z a archive.7z *.txt
#암호 설정 압축
#7z a -p비밀번호 archive.7z 파일명
7z a -p1234 secret.7z confidential.txt
728x90
반응형