| |
A free Basic UNIX-training with muLinux
Notes: This Text is roughly translated (German to English) by a translating program. Sorry, but I have not time for the translation. Maybe you can do this.
In order to store this exercise on our work diskette, we put these into the
floppy disk drive, mounten the drive after / a and change into the
directory /a.
/# mount /dev/fd0 /a
/# cd /a
/a#
Archiving / Compressing
The Archivierungstool tar
Protecting and archiving data take place usually on magnetic tapes.
Nowadays also different protection media, as CD-ROMs or ZIP media, are used.
However the standard program received its name for archiving under Unix by the use of magnetic tapes.
It means tar (tape archive).
In addition, it is used for data exchange, e.g. via email.
tar versions for DOS
The people who would like to use tar under DOS can download the DOS versions here:
That often used Windows program WinZip can also tar files read.
The muLinux version of tar does not possess all functions of others tar
- versions. The missing possibility for the compression can however also gzip
(see below) are completed.
Archive into a file
In order to create a file, the option c is used.
In order to write into a file, the option must f are indicated.
Uncompressed tar-files have the ending ".tar".
Over e.g. an archive file etc.tar on the diskette, those produce the
directory /etc, serves the following instruction contains:
/# tar -cf /a/etc.tar /etc
If you need a verbose display of the activities of tar, can the option requires v indicate.
/# tar -cvf /a/etc.tar /etc
The archiving of whole directories is surely applied at most.
In addition, individual files can be archived.
The following instruction archives the files /etc/passwd and /etc/issue in the file /a/myarchiv.tar:
/# tar -cf /a/myarchiv.tar /etc/passwd /etc/issue
Archive File Update
If all old files in a file are to be replaced by newer versions, then the option must u are indicated.
/# tar -uf /a/etc.tar /etc
Archive File Extract
To the extract an archive file serves the option x.
/# tar -xf /a/etc.tar
The Compression Program gzip
Compress
Unfortunately can the muLinux version of tar no compression of the data
make (option z ).
This is however very important to data exchange via Internet.
However is the command gzip for the order.
It serves the same purpose.
The of names end of a compressed file is ".gz".
A compressed tar file has then the a ".tar.gz" or ".tgz" within a DOS file system.
/# gzip /a/etc.tar
Decompress
To decompress one also use the gzip compressed file, the option serves d:
/# gzip -d /a/etc.tar.gz
Around this exercise to terminate we lift those mount - allocation of our work diskette up.
/a # cd /
/# umount /a
/#
Robert.Warnke@giso.de (copyleft) Robert Warnke, Berlin (Germany) - You can write me in English. | http://rowa.giso.de
|
| |
|
|