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 / SSH / 포트 변경하는 방법

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

Ubuntu 22.04 Server / ufw로 방화벽 설정하는 방법

우분투에서 방화벽을 설정하는 명령어는 ufw이다. ufw로 방화벽을 활성화시키고 관리하는 방법은 다음과 같다. 방화벽 활성화 ufw enable 방화벽 비활성화 ufw disable 방화벽 상태 확인 ufw status 53 포트 허용 ufw allow 53 53 포트 tcp 패킷 허용 ufw allow 53/tcp 53 포트 udp 패킷 허용 ufw allow 53/udp 53 포트 거부 ufw deny 53 53 포트 tcp 패킷 거부 ufw deny 53/tcp 53 포트 udp 패킷 거부 ufw deny ...

Ubuntu 20.04 Server / Samba / 설치하고 공유 폴더 만드는 방법

Ubuntu 20.04 Server / Samba / 설치하고 공유 폴더 만드는 방법

Samba를 이용하여 Ubuntu Server에 공유 폴더를 만들고, Windows 클라이언트에서 접속하는 방법을 알아본다. Samba 설치 Samba를 설치한다. 설치하면 바로 시작하고, 재부팅을 해도 자동으로 시작한다. apt install samba 공유할 폴더를 만들고 권한을 777로 설정한다. mkdir /sharedfolder chmod 777 /sharedfolder 설정 파일은 /etc/samba/smb.conf이다. 텍스트 에디터로 열고 제일 밑에 다음 코드를 추가한다. 폴더 이름은 sharedfolder이지만, 네트워크에서는 Shared Folder로 보인다. comment = ...

Ubuntu Server 22.04 / vsftpd로 FTP 서버 구축하기

vsftpd vsftpd(Very Secure FTP Daemon)는 유닉스와 리눅스에서 사용할 수 있는 가벼운 FTP 서버입니다. 주요 특징은 다음과 같습니다. Virtual IP configurations Virtual users Standalone or inetd operation Powerful per-user configurability Bandwidth throttling Per-source-IP configurability Per-source-IP limits IPv6 Encryption support through SSL integration 설치 vsftpd는 우분투 패키지에 포함되어 있으므로 다음과 같이 명령하여 설치할 수 있습니다. # apt install vsftpd 방화벽을 사용 중이라면 다음과 같이 명령하여 포트를 ...

Ubuntu 24.04 Server / root 계정으로 로그인할 수 있게, ssh 접속할 수 있게 설정하는 방법

Ubuntu는 설치할 때 일반 사용자 계정만 만들고, 관리자 권한이 필요할 때는 sudo를 이용한다. 만약 보안에 문제가 없는 경우라면 root 계정으로 로그인하는 게 작업하는 게 편하다. root 계정으로 로그인할 수 있게 설정하는 방법 일반 사용자 계정으로 로그인한다. 다음과 같이 명령하여 root 계정의 비밀번호를 만들면 root 계정으로 로그인할 수 있다. # sudo passwd root root 계정으로 ssh ...

Ubuntu 20.04 Desktop / 설치하기

Ubuntu 20.04 Desktop / 설치하기

다음은 Ubuntu 20.04 Desktop을 설치하는 과정입니다. Windows를 설치하는 것만큼 쉽고, 시간도 오래 걸리지 않습니다. Ubuntu Desktop을 다운로드하고 설치용 CD 또는 USB를 만듭니다. Rufus를 사용하면 편합니다. 컴퓨터에 설치용 미디어를 장착하고 부팅합니다. 잠시 기다리면... GUI로 설치를 시작합니다. 언어를 한국어로 정하고 를 클릭합니다. 키보드 레이아웃을 정하고 를 클릭합니다. 일반 설치와 최소 설치 중 하나를 선택합니다. 최소 설치를 하고 나중에 ...

Ubuntu 18.04 Server / 설치하기

Ubuntu 18.04 Server / 설치하기

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

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 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 / 설치 USB 만드는 방법

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