Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Linux command line syntax copy/zip

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

Technology Partners: 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

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é.
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
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.
Suggested Courses

715 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