Solved

Need to archive a directory structure while completly ignoring ".svn" directories

Posted on 2008-10-13
5
322 Views
Last Modified: 2013-11-15
Hi,

I want to archive a directory structure (FYI: checked out from Subversion) where a hidden directory ".svn" appears at every level of the directory structure BUT I DO NOT want this directory (or its contents) to appear in the archive file..

To state it another way, for clarity, I want to archive all files and directories in a specified directory and ignore directories (and contained files) named ".svn"

FYI: I am using ubuntu linux 8.04

Many thanks for your help,

John
0
Comment
Question by:johnwarde
[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
5 Comments
 
LVL 2

Accepted Solution

by:
tmaleshafske earned 175 total points
ID: 22701465

rsync is an excellent tool and has well document man pages.  I know from experience that it has the option to ignore specific directories.  There are also plenty of tutorial online on how to use it.  In addition there is a graphical front-end by I recommend to use the command line.
0
 
LVL 15

Assisted Solution

by:veedar
veedar earned 75 total points
ID: 22702476
tar version 1.20 has an option  --exclude-vcs
which will exclude .svn's


For more info do a    man tar
0
 
LVL 40

Expert Comment

by:omarfarid
ID: 22703476
see the options

--exclude FILE                   exclude file FILE
-X, --exclude-from FILE     exclude files listed in FILE

Please see

http://linux.about.com/od/commands/l/blcmdl1_tar.htm
0
 
LVL 2

Author Comment

by:johnwarde
ID: 22703566
Hi tmaleshafske,

I looked at rsync and it has lots of options, after much searching though the documentation, I found the options to solve my problem, for the benefit of others this is an example of what I used:

rsync -avzC --exclude="dbdata/" /home/me/src/  /home/me/backup/20081013

The above command copies (and compresses) the contents of /home/me/src/ to the /home/me/backup/20081013 direcory, the "-C" option ignores the ".svn" directories (including other common build generated files/directories); I used the "--exclude=dbdata/" option to exclude non-source datafiles.



Hi veedar,

Unfortunately the synaptic package manager GUI on my ubuntu 8.04 installation will not allow me to upgrade my "tar 1.19-3" package to 1.20, presumably becuase it has not been released or supported yet by unbuntu.

Thanks both of you for your help!

John

0
 
LVL 2

Expert Comment

by:tmaleshafske
ID: 22703739
Also it you are working on a project and need to do hourly updates you can accomplish that with a cron job
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

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…
The purpose of this article is to demonstrate how we can upgrade Python from version 2.7.6 to Python 2.7.10 on the Linux Mint operating system. I am using an Oracle Virtual Box where I have installed Linux Mint operating system version 17.2. Once yo…
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

626 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