Describe the compression ratios of zip gzip and bzip Be sure
Solution
1. out of the 3, bzip provides better compression ratio followed by gzip and zip though compression speed of zip is faster than gzip followed by bzip. as per file size is concerned, higher the compression level, lower the compression ratio and smaller the file size and bzip has got low compression level hence it produces bigger size compared tothe other 2.
2. i) archive files means it collects all files and forms a single file whereas compress files also form a single file but consumes less space.
ii) an archive file can\'t be compressed whereas compressed file can be archived.
iii) archive file doesn\'t alter the disk space occupied by the original files whereas compress files take less space in disk compared to the original archived files.
e.g. consider 5 600kb files. when it is archived a single file takes 30000kb space whereas compressed file will be only few kilobytes close to the original file of 600kb.
3. the 2 modes are i) Copies files into and ii) copies files out of archive storage and directories.
i) copies files into (cpio-i): copies files out of the archive. Only files with names that match particular paterns are selected i.e. only files whose names match one or more of those patterns are copied from the archive. If there are no patterns matching, all files are extracted.
ii) copies files out (cpio-o): copies files into an archive. it reads the standard input one per line to obtain a list of path names and writes those files onto the standard output.
4. main difference is a root user has access to control over every file in linux whereas regular user cannot have access to all files and change any configuration.
5. rwxr-xr- - : it means that rwx indicates read, write and execute is permitted to the user, rx means the group is allowed to read and execute but cannot write whereas the others has got only permission to read.
