Linux command line syntax copy/zip

how do I create a zip file of my httpdocs directory and save permission and directory structure?
pda4meAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
michofreihaConnect With a Mentor Commented:
tar -cvzpf filename.tar.gz /path/to/httpdocs
0
 
michofreihaCommented:
to zip a file on linux make the following:

gzip -c file_name

What do you mean by save permission and directory structure???
0
 
pda4meAuthor Commented:
sorry, I want to zip up my /httpdocs directory to a single file so that I can download it as a backup.
0
 
michofreihaCommented:
tar -cvzpf filename.tar.gz /path/to/folder
0
 
TintinCommented:
Given your question asked for zip, you do

zip -r  backup.zip /path/to/httpddocs
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.