Results 1 to 6 of 6
-
09-03-2006, 06:09 PM #1Junior Guru Wannabe
- Join Date
- Aug 2006
- Posts
- 76
via ssh i would like to zip an entire directory, but how?
I'm very new to linux and can't seem to find out how to do this. I'd like to know the command line to copy one of my directory folders and zip it. For example this directory has 3 gigs of files in it, so instead of ftp'ing this entire thing down file by file i'd like to ssh to my filesystem, enter a command that generates a zip of the directory (but leaves the current directory alone). Thanks for any help!
-
09-03-2006, 06:47 PM #2Eternal Member
- Join Date
- Dec 2004
- Location
- New York, NY
- Posts
- 10,710
cd /path/to/folder
zip whatever.zip *MediaLayer, LLC - www.medialayer.com Learn how we can make your website load faster, translating to better conversion rates for your business!
The pioneers of optimized web hosting, featuring LiteSpeed Web Server & SSD Storage - Celebrating 10 Years in Business
-
09-04-2006, 07:56 AM #3Web Hosting Evangelist
- Join Date
- Nov 2003
- Posts
- 477
Originally Posted by layer0
everything is simple but powerful
-
09-04-2006, 09:13 AM #4Hail Eris !
- Join Date
- Oct 2002
- Location
- Canada
- Posts
- 3,103
if your folder has subfolders you will need -r flag
zip -r filename.zip foldername/
-
09-04-2006, 07:42 PM #5Junior Guru Wannabe
- Join Date
- Aug 2006
- Posts
- 76
Originally Posted by sasha
~/desktop User$ zip -r scans.zip scans/
adding: scans/ (stored 0%)
adding: scans/.DS_Store (deflated 94%)
adding: scans/alley2.jpg (deflated 19%)
adding: scans/amelia.jpg (deflated 24%)
adding: scans/amelia_swanlake.jpg (deflated 20%)
adding: scans/amelia_swanlake2.jpg (deflated 17%)
adding: scans/keepclear.jpg (deflated 16%)
adding: scans/Scan 1.jpg (deflated 22%)
adding: scans/Scan 1.tiff (deflated 38%)
adding: scans/Scan 2.jpg (deflated 19%)
adding: scans/Scan 2.tiff (deflated 32%)
adding: scans/Scan 3.tiff (deflated 27%)
adding: scans/Scan 4.tiff (deflated 17%)
adding: scans/Scan.tiff (deflated 35%)
adding: scans/untitled folder/ (stored 0%)
adding: scans/untitled folder/.DS_Store (deflated 96%)
adding: scans/untitled folder/untitled folder/ (stored 0%)
adding: scans/Untitled-1.psd (deflated 43%)
adding: scans/window.jpg (deflated 16%)
I'd rather it just accept a command and then give me back my terminal cursor when it's complete..
-
09-04-2006, 08:14 PM #6Web Host
- Join Date
- Jun 2002
- Posts
- 1,798
zip -h and look for the option to do it silently.