Making Archive Files
On a MS Windows System
On an Ubuntu Linux System
Using the GNOME file browser
- Start the graphical file browser, e.g. from the Places Menu in the top panel select Home Folder
- In the file browser navigate to a folder containing the relevant files
- Select the files to include in the archive, e.g. click on a file and then hold down Ctrl and click on other files to select a specific set of files
- Right click on one of the selected files to reveal a menu and choose the option compress
- A dialog window will appear in which you can select the type of archive to create (tar.gz by default but you could choose zip etc) and the name and location of the archive file being created
- Click the create button and it will create the archive file containing the previously selected set of files
Using file roller
You can start the file roller with the command file-roller. The application has a button to create a new empty archive (which you then name) and buttons to open archives and add files and folders to the archive.
Command Line Tool
Tar can be used to combine a set of files into one single archive file and gzip (compress) that archive. For example suppose you wish to tar and compress the entire contents of a directory (called bar) and all its sub directories then you can do
tar -cvzf bar.tar.gz bar
The option c says to create a new archive, the v means we are in verbose mode (so we can see what it is doing), the z means to compress the tar file, and the f specifies the next thing will be the name of the tar archive. The final argument is the directory we wish to tar, it could have equally been a list of the files we wanted to put in the archive.
If you are given a tar.gz archive you can check its contents with
tar -tvzf bar.tar.gz
and you can then extract the contents with
tar -xvzf bar.tar.gz
(Note tarred and zipped archive sometimes have the extension .tgz rather than .tar.gz).
zip archive-name.zip file1 file2 ......
To zip up the entire contents of a directory (called bar) and its sub directories do
zip -r bar.zip bar
For maximum compression instead do
zip -9r bar.zip bar
To list the contents of a zip file do
unzip -t bar.zip
To unzip a zipped file use unzip, e.g.