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 24.04 Server / 설치된 패키지 확인하는 방법

Ubuntu 24.04 Server / 설치된 패키지 확인하는 방법

우분투에서 설치된 패키지 확인은 apt 또는 dpkg 명령어로 할 수 있다. 출력하는 내용에 차이가 있다. apt 명령어로 설치된 패키지 확인 설치된 모든 패키지를 출력한다. # apt list --installed 설치된 패키지 중 이름에 mariadb가 있는 것을 출력한다. # apt list --installed | grep mariadb dpkg 명령어로 설치된 패키지 확인 설치된 모든 패키지를 출력한다. # dpkg -l 설치된 패키지 중 이름에 ...

Ubuntu 24.04 Server / SSH / 포트 변경하는 방법

보안 등의 이유로 SSH 포트를 변경해야 한다면, 다음과 같이 한다. /etc/ssh/sshd_config에서 다음의 코드를... #Port 22 다음으로 변경한다. Port 1980 방화벽이 활성화되어 있다면 1980 포트를 열어준다. ufw allow 1980/tcp SSH 서비스를 다시 시작한다. systemctl restart ssh SSH 서비스를 다시 시작해도 적용되지 않으면, 컴퓨터를 다시 시작한다.

Ubuntu 16.04 / 메모

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

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 / 언어 변경하는 방법

현재 언어 확인하기 locale 명령어로 현재 언어를 확인할 수 있다. # locale LANG=en_US.UTF-8 LANGUAGE= LC_CTYPE="en_US.UTF-8" LC_NUMERIC="en_US.UTF-8" LC_TIME="en_US.UTF-8" LC_COLLATE="en_US.UTF-8" LC_MONETARY="en_US.UTF-8" LC_MESSAGES="en_US.UTF-8" LC_PAPER="en_US.UTF-8" LC_NAME="en_US.UTF-8" LC_ADDRESS="en_US.UTF-8" LC_TELEPHONE="en_US.UTF-8" LC_MEASUREMENT="en_US.UTF-8" LC_IDENTIFICATION="en_US.UTF-8" LC_ALL= 언어 추가하기 사용 가능한 언어는 locale -a로 확인할 수 있다. # locale -a C C.utf8 en_US.utf8 POSIX 예를 들어 한국어를 추가하고 싶다면 아래와 같이 명령한다. # apt install language-pack-ko locale -a로 설치 확인을 한다. # locale -a C C.utf8 en_US.utf8 ko_KR.utf8 POSIX 언어 변경하기 다음과 같이 명령하면 사용하는 언어가 한국어로 바뀐다. update-locale LANG=ko_KR.utf8 로그아웃 후 다시 로그인하거나, 컴퓨터를 다시 시작하면 ...

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 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 Default ...

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 만약 위와 같이 해도 ...

Ubuntu 16.04 Server / logrotate 설치하고 설정하기

우분투(Ubuntu)는 여러 작업의 내용을 로그(Log) 파일로 남깁니다. 예를 들어 웹서버 운영과 관련된 로그는 /var/log/apache2에 있습니다. 로그는 기본적으로 하나의 파일에 계속 추가하는 것이어서, 시간이 지날수록 파일의 크기가 커집니다. 로그 파일의 크기가 너무 커지면, 시스템이 느려지거나 다운되기도 합니다. 이러한 문제를 해결해주는 패키지가 logrotate입니다. 로그 파일이 일정 기준을 충족하면 기존 로그 파일을 다른 이름으로 변경하여 저장하고 ...

Ubuntu 18.04 Server / 설치하기

Ubuntu 18.04 Server / 설치하기

다운로드 Ubuntu Server 다운로드 페이지는 다음과 같다. https://ubuntu.com/download/server 최신 버전에 대한 안내가 주로 있으므로, 구버전을 다운로드하고 싶다면 아래 링크가 편하다. https://mirror.kakao.com/ubuntu-releases/ 가상 머신에 설치한다면 다운로드한 ISO 파일을 그대로 사용하면 되고, 물리 서버에 설치한다면 Rufus 같은 툴을 이용하여 부팅 USB를 만든다. 설치 설치 미디어로 부탕하고 잠시 기다리면 언어를 선택하는 화면이 나온다. 원하는 언어를 선택하고 엔터키를 누른다. 키보드 레이아웃을 정하고 ...