Compress Commands

  •  zip
  • gzip
  • tar

ZIP Command: (files & dir – 65% compress)

zip file_name.zip file_name     //zip the file
zip -r dir.zip dir_name     //zip the directory
zip -e dir.zip dir_name     // Password Protected ZIP file
zip -s 1g -r archivename.zip directory_name     //splite file 1gb

unzip file_name.zip     //extract the zip file
unzip dir.zip

GZIP Command: (only file to move //65% compress)

gzip file_name     //gzip the file

gunzip file_name.gz     //extract the gzip file

TAR Command: (file or folders to file – no compress)

tar -cvf file_name.tar file_name     //make tar file
tar -cvf dir_name.tar dir_name
tar -xvf file_name.tar
     //untar the tar file

tar -cvzf file_name.tar.gz file_name     //make tar file with compress
tar -cvzf dir_name.tar.gz dir_name
tar -xvzf file_name.tar.gz     //untar the tar file

Popular posts from this blog

Oracle Database 19C Performance Tunning - PART 1

Oracle RMAN Backup And Restore

Oracle Patching Using Opatch Utility

Welcome to DBA Master – Database Tips, Tricks, and Tutorials

Oracle 19c Database Software Installation in OEL8

PostgreSQL Triggers

PostgreSQL Opensource Installation in RHEL or Oracle Linux(OEL) 8 and above

PostgreSQL Cursor

PostgreSQL Procedures

PostgreSQL User & Role Management