This repository contains a Bash script for unpacking compressed files. The script provides the functionality to decompress files of various compression types, including gzip, bzip2, zip, and compress.
You can use this script to efficiently unpack compressed files in a directory.
- Bash shell (Most Unix-like systems come with Bash pre-installed)
file
command for determining compression typegunzip
,bunzip2
,unzip
, anduncompress
commands for decompression (Make sure these are available on your system)
-
Clone this repository to your local machine:
git clone https://github.com/your-username/file-unpacking-script.git
-
Change into the repository directory:
cd file-unpacking-script
-
Make the script executable:
chmod +x unpack.sh
-
Run the script with desired options and file paths:
./unpack.sh [options] file1 file2 directory1 ...
Available options:
-r
: Enable recursive unpacking for directories (optional)-v
: Enable verbose output (optional)
Example usage:
./unpack.sh -r -v compressed_directory/file1.gz compressed_file.zip another_directory
Suppose you have a directory named archives
containing compressed files, and you want to unpack them:
./unpack.sh -r archives
This command will recursively unpack all files in the archives
directory.
Contributions to this repository are welcome! Feel free to submit issues and pull requests.
This project is licensed under the MIT License.