Skip to content



  • linux
$ sudo apt-get install p7zip-full


Usage: 7z <command> [<switches>...] <archive_name> [<file_names>...]

  a : Add files to archive
  b : Benchmark
  d : Delete files from archive
  e : Extract files from archive (without using directory names)
  h : Calculate hash values for files
  i : Show information about supported formats
  l : List contents of archive
  rn : Rename files in archive
  t : Test integrity of archive
  u : Update files to archive
  x : eXtract files with full paths
  • 打包文件/文件夹
$ 7z a Sample
  • 解压文件/文件夹
$ 7z e