Your HostICan Community  


Go Back   Your HostICan Community > Programming & Design > PHP / MySQL Assistance
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

PHP / MySQL Assistance We understand. Not all of you are experienced programmers, but some of you are highly skilled at coding. So we've set aside this forum so you can ask questions, and provide answers to the most commonly asked PHP / MySQL issues.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 03-11-2008, 06:06 PM
Junior Member
 
Join Date: Oct 2007
Posts: 8
Default SSH - unzip files on server

Hi, newbie question, been driving me crazy... my server is VPS, and I can't figure out how to automate unzipping of files using SSH. Manually, it seems to work using the following:

gzip -d -f file.txt.gz

And in fact, the gz file is auto-deleted (odd, but true?)

Can someone pls tell me the correct syntax to run this for numerous files..? This doesn't work:

gzip -d -f file2.txt.gz
gzip -d -f file3.txt.gz

It returns "file2.txt.gz.gz: No such file or directory" (even when I delete the gz extension)

And also to continue the steps, if one file isn't found.

Thanks!
Reply With Quote
  #2 (permalink)  
Old 03-11-2008, 07:50 PM
lnxcode's Avatar
The British Kid
 
Join Date: Sep 2007
Location: Richmond, VA
Posts: 1,644
Send a message via AIM to lnxcode Send a message via Skype™ to lnxcode
Default

You can do this to unzip a file:

unzip filename.zip to unzip an archive.

You can do this:

1. gunzip filename.tar.gz
2. tar -vxf filename.tar
3. Now you're only left with filename

__________________
Thanks,

Denis Motova
Affiliate / Operations Manager

HostICan Answers | HostICan Newsletter | HostICan Blog | Become a HostICan Affiliate | Create a Support Ticket.
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 On



All times are GMT -4. The time now is 06:52 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO 3.1.0

Copyright © 2003 - 2008 HostICan. All Rights Reserved.