Custom Search

Monday, April 29, 2013

How to create tar.gz file in ubuntu

How to create tar.gz file in Ubuntu

a) Create a tar.gz file including all files in the current directory
#tar -czvf data.tar.gz *

b) Create a tar.gz file including all files in the directory data_dir
#tar -czvf data.tar.gz data_dir


c) Create a tar.gz file including files data_file1 and data_file2
#tar -czvf data.tar.gz data_file1 data_file2

No comments:

Post a Comment