Wednesday, 26 June 2013

How to compress and extract zip, tar , tar.gz and tar.bz2 in Linux/RHEL/Centos


ZIP : Compress and extract zip file in Linux

Compress file and folder with zip

# zip -r archive-name.zip directory_name

extract file and folder with zip
#unzip archive-name.zip

TAR: Compress and extract TAR file in Linux

Compress file and folder with tar
# tar -cvf archive-name.tar directory_name

extract file and folder with tar
# tar -xvf archive-name.tar

Define location where you want to extract

# tar -xvf archive-name.tar -C /home/extract-here/

TAR.GZ: Compress and extract TAR.GZ file in Linux

Compress file and folder with tar.gz
# tar -zcvf archive-name.tar.gz directory_name

extract file and folder with tar
# tar -zxvf archive-name.tar.gz

Define location where you want to extract

# tar -zxvf archive-name.tar.gz -C /tmp/extract_here/

TAR.BZ2: Compress and extract TAR.BZ2 file in Linux

Compress file and folder with tar.bz2
# tar -jcvf archive-name.tar.bz2 directory_name

extract file and folder with tar
# tar -jxvf archive-name.tar.bz2

Define location where you want to extract

# tar -jxvf archive-name.tar.bz2 -C /tmp/extract_here/

Reset Grace Period of Windows Server 2012 RDS

Error: the remote session was disconnected because there are no remote desktop license servers available to provide license in aws Solu...