Solved

Linux command line syntax copy/zip

Posted on 2008-10-16
5
1,449 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Get your Disaster Recovery as a Service basics

Disaster Recovery as a Service is one go-to solution that revolutionizes DR planning. Implementing DRaaS could be an efficient process, easily accessible to non-DR experts. Learn about monitoring, testing, executing failovers and failbacks to ensure a "healthy" DR environment.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
This article will explain how to establish a SSH connection to Ubuntu through the firewall and using a different port other then 22. I have set up a Ubuntu virtual machine in Virtualbox and I am running a Windows 7 workstation. From the Ubuntu vi…
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…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Suggested Courses

627 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