Copied to clipboard

unzip

unzip is a commonly used command line tool for decompressing compressed files. It can decompress various compression formats, including .zip, .tar, .gz, .bz2, .xz, etc.

Example

  1. Extract a .zip file:

    unzip file.zip
    
  2. Extract a .zip file to a specific directory:

    unzip file.zip -d destination_directory
    
  3. Extract a .zip file and overwrite existing files:

    unzip -o file.zip
    
  4. Extract a .zip file and display extraction progress:

    unzip -v file.zip
    
  5. Extract a .tar file:

    unzip file.tar
    
  6. Extract a .tar file to a specific directory:

    unzip file.tar -d destination_directory
    
  7. Extract a .tar.gz file:

    unzip file.tar.gz
    
  8. Extract a .tar.gz file to a specific directory:

    unzip file.tar.gz -d destination_directory