Solved

Linux command line syntax copy/zip

Posted on 2008-10-16
5
1,442 Views
Last Modified: 2013-12-16
how do I create a zip file of my httpdocs directory and save permission and directory structure?
0
Comment
Question by:pda4me
  • 3
5 Comments
 
LVL 9

Expert Comment

by:michofreiha
ID: 22729870
to zip a file on linux make the following:

gzip -c file_name

What do you mean by save permission and directory structure???
0
 

Author Comment

by:pda4me
ID: 22729884
sorry, I want to zip up my /httpdocs directory to a single file so that I can download it as a backup.
0
 
LVL 9

Expert Comment

by:michofreiha
ID: 22729914
tar -cvzpf filename.tar.gz /path/to/folder
0
 
LVL 9

Accepted Solution

by:
michofreiha earned 500 total points
ID: 22729921
tar -cvzpf filename.tar.gz /path/to/httpdocs
0
 
LVL 48

Expert Comment

by:Tintin
ID: 22735415
Given your question asked for zip, you do

zip -r  backup.zip /path/to/httpddocs
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Introduction We as admins face situation where we need to redirect websites to another. This may be required as a part of an upgrade keeping the old URL but website should be served from new URL. This document would brief you on different ways ca…
It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now