Go Back   Cloud Computing > Support > Tutorials and Documentation
 

Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old 07-01-11, 10:22
BOD Member
 
Join Date: Apr 2011
Posts: 85
Default How to compress files using SSH?

Hello

I am a novice user to SSH thing or is it SSL...what is the actual difference between both? Anyway, that is not so important, actually I am looking at the SSH black screen and thinking what is the right command to compress a folder into tar.zg? I know how to navigate the folders and also know how to extract it, but the funny problem is I don't know how to compress it?
Reply With Quote
  #2 (permalink)  
Old 07-03-11, 08:26
BOD Member
 
Join Date: Apr 2011
Posts: 42
Smile

Hello Henry hope you are well.
If you need to compress a folder just fire the below command:

Quote:
tar cf dir.tar dir/
tar czf dir.tar.gz dir/
tar cjf dir.tar.bz2 dir/
Here the first command will be generating a normal .tar file
The secound command will generate a tar.gz (which you want to do ) and the last command will generate .tar.bz2.

Ok now lets come to the description of the above command that is each options like 'c' , 'z' ,'f'

Quote:
-c, --create is used to create a new archive
-f, --file [HOSTNAME:]F use archive file or device F
-z, --gzip, --ungzip filter the archive through gzip,
Now let see how to extract or unzip the files
To unzip or extract just fire the below command:

Quote:
tar xf dir.tar
tar xf dir.tar.gz
tar xf dir.tar.bz2
Quote:
Here -x, --extract, --get extract files from an archive
Thats it!! Hope this information helps you.
Reply With Quote
  #3 (permalink)  
Old 07-04-11, 12:09
BOD Member
 
Join Date: Apr 2011
Posts: 85
Default

Hello valentine I guess, I am well, but not sure, as I have a strong hangover of last night and I am still feeling that I am in kindergarten school Anyway, thanks for the tutorial and guidelines.....

Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump


All times are GMT -6. The time now is 00:04.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
Copyright © 1999-2012, BODHost Ltd. All rights reserved.