Say you have some web software such as WordPress, MediaWiki, or Gallery installed, and you used a tarball and not Subversion. Now, you want to manage the installation using Subversion, but you don’t want to jump through hoops running diffs and moving files around.
Here’s how to do it (thanks to Asheesh for the recipe).
- Check out the software somewhere.
(cd $PATH_TO_NON_SVN_DIR ; tar cf - . ) | (cd $PATH_TO_SVN_DIR ; tar xvf -)
This will “overlay” the non-svn-dir over the new checkout, leaving your existing installation untouched.
ShareThis
Red Hat magazine posted this tip on splitting tar archives on the fly:
Splitting big files into pieces is a common task. Another common task is to create a tar archive, and split it into smaller chunks that can be burned onto CD/DVD. The straightforward approach is to create the archive and then use ’split.’ To do this, you will need more free space on your disk. In fact, you’ll need space twice the size of the created archive. To avoid this limitation, split the archive as it is being created.
This is a very simple and unixy approach to a pretty common problem. Eventually I’ll have to adapt my DVD backup script to use this.
ShareThis