How To Compress Directory In Linux?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
1. Using tar command:
The tar command can be used to create an archived version of a directory in Linux. To compress a directory with tar, use the following command in your terminal:
$ tar -zcvf archive-name.tar.gz directory-name
2. Using zip command:
The zip command can be used to compress individual files or entire directories in Linux. To compress a directory with zip, use the following command in your terminal:
$ zip -r archive-name.zip directory-name