hosted by liquidweb


Go Back   Web Hosting Talk : Web Hosting Main Forums : Hosting Security and Technology : tar /gzip and exclusion of directories
Reply

Hosting Security and Technology Configuring and optimizing web hosting servers and operating systems, developing administration scripts, building servers, protecting against hackers, and general security (SSL certificates, etc.)
Forum Jump

tar /gzip and exclusion of directories

Reply Post New Thread In Hosting Security and Technology Subscription
 
Send news tip View All Posts Thread Tools Search this Thread Display Modes
  #1  
Old 09-23-2001, 12:12 PM
eva2000 eva2000 is offline
Premium Member
 
Join Date: Apr 2000
Location: Brisbane, Australia
Posts: 1,073
Question

tar /gzip and exclusion of directories


wonder if this is possible and what the exact syntax is..

i.e. if i had a directory

Code:
/home
 /public_html
   /directory1
   /directory2
   /directory3
now if i wanted to tar up all of public_html

i'd type

cd /home
tar cvf public.tar public_html

but what if i want to tar up all except directory1 and directory3 (exclude directory1 and directory3) ?

what should i type ?

thanks

__________________
:: vB benchmarks = Litespeed Cache 721x times faster than Apache
:: MySQL benchmarks (MariaDB 5.2 Intel Opt >MariaDB 5.2 >Percona 5.5 >MySQL 5.5)
:: MySQL backup/restore = mydumper > mysqldump
:: CentminMod.com = Nginx Menu Installer (ngx_pagespeed + SPDY supported)


Reply With Quote


Sponsored Links
  #2  
Old 09-23-2001, 02:26 PM
Jm4n Jm4n is offline
WHT Addict
 
Join Date: Aug 2001
Posts: 137
man tar -- that will give you the information you need.

What you're looking for is --exclude. For example:

tar -zcf -C /home public_html --exclude public_html/dir1 --exclude public_html/dir2 ...

The -C makes 'tar' change to directory /home, and the exclude path is relative to /home.
Again, you should familiarize yourself with the 'tar' command by reading the man pages; everything you ever wanted to know about 'tar' is in there, and then some.

__________________
- Jman

Reply With Quote
Reply

Related posts from TheWhir.com
Title Type Date Posted
The Social Media Issue Magazine 2012-06-13 10:19:38
Website Optimization Provider Yottaa Launches Mobile Site Acceleration Service Web Hosting News 2012-05-14 11:26:21
Bangladeshi Hacker TiGER-M@TE Targets InMotion Hosting Web Hosting News 2011-09-26 15:24:05
Hosting Provider HostGee Offers Free Attracta SEO Tools via cPanel Web Hosting News 2011-06-03 21:00:27
Yellow Pages Subsidiary Partners with Rackspace, Environmental Groups Web Hosting News 2011-06-03 16:23:27


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes
Postbit Selector

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump
Login:
Log in with your username and password
Username:
Password:



Forgot Password?
Advertisement:
Web Hosting News:



 

X

Welcome to WebHostingTalk.com

Create your username to jump into the discussion!

WebHostingTalk.com is the largest, most influentual web hosting community on the Internet. Join us by filling in the form below.


(4 digit year)

Already a member?