zip – how useful!

February 3, 2010 by jerome

This might sound trivial to a lot of us – but i find it so useful so often… Maybe you have other practice for such use – just let me know!

Zip let’s you archive a whole directory wiht many subdirectories and files inside in one convenient file. It’s usually done trough the OS UI by simply right clicking on a directory and selecting compress or archive this from the contextual menu.
When you want to download an archive of a website or any files online it is sometimes a lot more effective and convenient to just use the same zip archive. Unfortunately FTP programms wont let you do any such thing – so you have to bypass – if you are the lucky user of a server with an SSH access nothing is simpler:

connect to the server using the terminal:
ssh username@myserver.com

insert the password

navigate to the top of the directory you want to archive

type:
zip -r archiveFileName directoryName

* this will archive the content of directoryName into a zip file called archiveFileName; -r stands for recursive

** according to the number and size of the files in your archive, the compressing can take very long – i like to have it running on a second screen exactly like an activity monitoring device of the server life – sort of an electronic presence of the machine.

*** you can then move the zip file around, transfert it to another ftp or use it locally – unzip command will let you un pack the archive and access the files.

sangbleuarchiving.electronicpresence.png

**** if you are using fuse – don’t think the conextual menu is the best solution: you would be using zip on your computer and would download each files to be compressed on your local machine, and doing the compression on the distant disk. Latency time for read and write access will be HUGE. Chances are your are going to kill a couple of processes on your own machine, at best this will take ages (like in days). Just use the ssh via the terminal and all the compression task will happen on the distant server, leaving your computer free of sluggish clogging.


No Comments »

No comments yet.

RSS feed for comments on this post. TrackBack URL

Leave a comment