Commands: $ logname  to check present working user. User2 $ clear

Download 122.5 Kb.
Size122.5 Kb.
1   ...   4   5   6   7   8   9   10   11   ...   17
Unix Commands
Compressing File

Compacts a file so that it is smaller. When compressing a file it will be replaced with a file with the extension .gz, while keeping all the same ownership modes.
gzip is command to compress a file. gzip is any of several software applications used for file compression and decompression. The term usually refers to the GNU Project's implementation, "gzip" standing for GNU zip. It is based on the DEFLATE algorithm, which is a combination of Lempel-Ziv (LZ77) and Huffman coding.
Syn: $ gzip [filename]
After compressing file into zip file then file name will be changed to and the original file will not be available.
Ex: $ gzip file1
Result is file1.gz and the original file file1 will not be available.

  • Uncompressing File

To uncompress the zip file gunzip command is used.
Syn: $ gunzip [filename.gz]
Ex: $ gunzip file1.gz
Result is file1

Archival file is a pack which contains hierarchy file system.

  • Creating archival file

“tar” is command used to create archival file.
Syn: $ tar –cvf [user defined name.tar] [dir name]
c  create new archival file
v  VERBOSE is security protocol
f  specified files
$ tar –cvf myarchive.tar .  . refer to all files in current working directory
$ tar -cvf myarchive1.tar x  all files in x directory
$ tar –cvf myarchive2.tar file1 file2 file3 file4  files to be archived

To extract the archive file tar command with option –xvf is used.
Syn: $ tar –xvf [archived file name]
Ex: $ tar –xvf myarchive.tar
Here x stand for extract archive file
1   ...   4   5   6   7   8   9   10   11   ...   17

The database is protected by copyright © 2024
send message

    Main page