Linux questipn How is archivingcompression done in Linuxby d
Linux questipn
How is archiving/compression done in Linux(by default)?
Solution
File compression/archiving in Linux:
An archive file can be defined as a combination of files and directories stored at the same location, this archived file cannot be compressed but a compressed file can be archived. A file is compressed in order to reduce the size of the file.
And in Linux we use file roller for compress/decompress/Unarchive/Archive a file. To start this we need to open the Archive manager from the applications. We can also have some commands for compressing at shell command also using bzip2, zip, gzip.
And for archiving at shell prompt we have few commands:
· c — creates a new archive
· -f — when used with the -c option, use the filename specified for the creation of the tar file; when used with the -x option for unarchiving.
· -t — list of files in tar file
· -v — progress of the files being archived
· -x — extract files from an archive file
· -z — compresses tar file with gzip
· -j — compresses tar file with bzip2
