Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Linux command line syntax copy/zip

Posted on 2008-10-16
5
Medium Priority
?
1,453 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 2000 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…
In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
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…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Suggested Courses
Course of the Month9 days, 14 hours left to enroll

927 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