Ubuntu 22.04 Server / ZIP 압축 파일 푸는 방법

ZIP 파일을 압축 해제하기 위해서는 unzip 패키지가 필요하다.

# apt install unzip

xxx.zip 파일을 압축 해제하려면 다음과 같이 명령한다.

# unzip xxx.zip

다음과 같이 명령하여 도움말을 볼 수 있다.

# unzip -h

결과는 다음과 같다.

UnZip 6.00 of 20 April 2009, by Debian. Original by Info-ZIP.

Usage: unzip [-Z] [-opts[modifiers]] file[.zip] [list] [-x xlist] [-d exdir]
  Default action is to extract files in list, except those in xlist, to exdir;
  file[.zip] may be a wildcard.  -Z => ZipInfo mode ("unzip -Z" for usage).

  -p  extract files to pipe, no messages     -l  list files (short format)
  -f  freshen existing files, create none    -t  test compressed archive data
  -u  update files, create if necessary      -z  display archive comment only
  -v  list verbosely/show version info       -T  timestamp archive to latest
  -x  exclude files that follow (in xlist)   -d  extract files into exdir
modifiers:
  -n  never overwrite existing files         -q  quiet mode (-qq => quieter)
  -o  overwrite files WITHOUT prompting      -a  auto-convert any text files
  -j  junk paths (do not make directories)   -aa treat ALL files as text
  -U  use escapes for all non-ASCII Unicode  -UU ignore any Unicode fields
  -C  match filenames case-insensitively     -L  make (some) names lowercase
  -X  restore UID/GID info                   -V  retain VMS version numbers
  -K  keep setuid/setgid/tacky permissions   -M  pipe through "more" pager
  -O CHARSET  specify a character encoding for DOS, Windows and OS/2 archives
  -I CHARSET  specify a character encoding for UNIX and other archives

See "unzip -hh" or unzip.txt for more help.  Examples:
  unzip data1 -x joe   => extract all files except joe from zipfile data1.zip
  unzip -p foo | more  => send contents of foo.zip via pipe into program more
  unzip -fo foo ReadMe => quietly replace existing ReadMe if archive file newer

 

같은 카테고리의 다른 글
Ubuntu / 특정 패키지만 업그레이드 하기, 보안 업데이트만 업그레이드 하기

Ubuntu / 특정 패키지만 업그레이드 하기, 보안 업데이트만 업그레이드 하기

우분투 서버에 접속하면 업데이트가 필요한 패키지가 있는지 알려줍니다. 두 가지 분류로 알려주는데, 하나는 패키지 업데이트, 또 하나는 보안 업데이트입니다. 소프트웨어는 보통 최신 버전을 유지하는 것이 좋지만, 업그레이드했을 때 문제가 없는지 충분히 확인을 해야 합니다. 따라서 특정 패키지만 업그레이드를 하거나, 보안 업데이트만 해야 하는 경우가 발생하는데, 어떻게 그런 작업을 하는지 알아보겠습니다. 특정 ...

Ubuntu 18.04 Server / Nginx, PHP, MariaDB 설치하고 설정하기

Ubuntu 18.04 Server / Nginx, PHP, MariaDB 설치하고 설정하기

Nginx 설치 Nginx를 설치합니다. # apt install nginx 만약 방화벽을 사용하고 있다면 포트를 열어줍니다. # ufw allow 'Nginx Full' 서버 주소로 접속했을 때 다음과 같이 나오면 제대로 된 것입니다. 시작, 정지 등 Nginx를 시작합니다. # systemctl start nginx Nginx를 멈춥니다. # systemctl stop nginx Nginx를 재시작합니다. # systemctl restart nginx Nginx를 다시 로드합니다. # systemctl reload nginx Nginx를 설치하면 부팅 시 자동으로 시작하게 설정됩니다. 만약 자동 ...

Ubuntu 16.04 / phpMyAdmin / 특정 IP에서만 접속 가능하게 만드는 방법

Ubuntu 16.04 / phpMyAdmin / 특정 IP에서만 접속 가능하게 만드는 방법

우분투 16.04에서 phpMyAdmin을 패키지로 설치했을 때, 기본 설정은 모든 IP에서 접속 가능입니다. 만약 특정 IP에서만 접속 가능하게 하려면 /etc/apache2/conf-available/phpmyadmin.conf에 다음 코드를 추가합니다. <Directory /usr/share/phpmyadmin> Order deny,allow Deny from all Allow from xxx.xxx.xxx.xxx </Directory> xxx.xxx.xxx.xxx는 접속하려는 IP로 바꿉니다. 여러 IP를 설정하고 싶을 때는 띄어쓰기로 구분합니다. <Directory /usr/share/phpmyadmin> Order deny,allow Deny from all ...

Ubuntu 24.04 Server / 고정 IP 설정하는 방법

네트워크 설정 파일은 /etc/netplan 디렉토리 안에 있는 yaml 파일이다. # ll /etc/netplan total 12 drwxr-xr-x 2 root root 4096 Apr 27 23:00 ./ drwxr-xr-x 108 root root 4096 Apr 27 23:06 ../ -rw------- 1 root root 389 Apr 27 23:00 50-cloud-init.yaml DHCP라면 설정 파일이 다음과 비슷하게 되어 있다. # This file is ...

Ubuntu 16.04 / 메모

Ubuntu 16.04 / 메모

PHP intl 설치 apt install php-intl service apache2 reoad APCu 설치 apt install php-apcu service apache2 reload

Ubuntu 18.04 Server / Apache / 사용자 인증 만드는 방법

Ubuntu 18.04 Server / Apache / 사용자 인증 만드는 방법

웹사이트의 콘텐츠를 특정 사용자만 볼 수 있게 하는 방법은 여러 가지가 있습니다. 만약 웹서버에 대한 충분한 권한이 있다면, Apache를 이용하여 구현할 수 있습니다. 비밀번호 파일 만들기 비밀번호 파일은 htpasswd 명령어로 만듭니다. /home/auth/ 디렉토리에 passwords라는 이름의 파일을 만들고, 사용자 user1의 비밀번호를 정하고 싶다면 다음과 같이 명령합니다. # htpasswd -c /home/auth/passwords user1 .htaccess 파일 만들기 웹사이트의 루트 ...

Ubuntu Server / do-release-upgrade / 버전 업그레이드 명령어

Ubuntu Server / do-release-upgrade / 버전 업그레이드 명령어

Ubuntu 새 버전이 나오면 어떻게 업그레이드를 할까? 새로 설치하고 다시 설정하는 게 제일 좋지만, 설정할 게 많다면 바로 업그레이드를 할 수도 있다. 업그레이드는 do-release-upgrade 명령어로 한다. do-release-upgrade -h Usage: do-release-upgrade Options: -h, --help show this help message and exit -V, ...

Ubuntu / 설치 USB 만드는 방법

Ubuntu / 설치 USB 만드는 방법

ODD가 없는 컴퓨터에 OS를 설치하는 방법은 두가지입니다. 첫번째는 휴대용 ODD를 이용하는 것이고, 두번째는 USB에 설치 파일을 넣어서 이용하는 것입니다. 두번째 방법이 간편하기는 하지만 설치용 USB를 만드는 게 좀 번거롭습니다. 하지만, 우분투(Ubuntu) 설치용 USB는 몇 번의 클릭으로 쉽게 만들 수 있습니다. 우분투 다운로드 원하는 우분투 버전을 다운로드 받습니다. Universal USB Installer 다운로드 다음의 링크에서 Universal USB Installer를 다운로드 ...

Ubuntu 18.04 Server / 시간대(time zone) 설정하는 방법

Ubuntu 18.04 Server / 시간대(time zone) 설정하는 방법

현재 서버의 시간대 확인 현재 서버에 설정된 시간대는 date 명령어로 확인할 수 있다. # date 시간대 설정 방법 1 - dpkg-reconfigure tzdata 시간대를 설정하고 싶다면 다음과 같이 명령한다. # dpkg-reconfigure tzdata 한국이라면 Asia를 선택하고 Seoul을 선택합니다. 시간대 설정 방법 2 - tzselect tzselect 명령으로 설정할 수 있다. 번호를 입력하여 시간대를 정한다. # tzselect Please identify a location so that time ...

Ubuntu 16.04 Server / 고정 IP 설정하는 방법

Ubuntu 16.04 Server / 고정 IP 설정하는 방법

네트워크 설정 파일은 /etc/network/interfaces이다. 우분투를 DHCP로 설치했다면 설정 파일의 내용은 다음과 비슷하게 되어 있다. # The primary network interface auto enp0s3 iface enp0s3 inet dhcp 이를 다음처럼 변경하고 저장한다. xxx.xxx.xxx.xxx는 네트워크 환경에 맞게 수정한다. # The primary network interface auto enp0s3 iface enp0s3 inet static address xxx.xxx.xxx.xxx netmask xxx.xxx.xxx.xxx gateway xxx.xxx.xxx.xxx dns-nameservers xxx.xxx.xxx.xxx 다음과 같이 명령하여 네트워크를 재시작한다. systemctl restart networking.service 만약 위와 같이 해도 ...