Date: Wed, 13 Dec 2006 15:38:26 -0500 From: Bill Moran <wmoran@collaborativefusion.com> To: Beech Rintoul <beech@alaskaparadise.com> Cc: freebsd-questions@freebsd.org Subject: Re: Shar question Message-ID: <20061213153826.ddff57be.wmoran@collaborativefusion.com> In-Reply-To: <200612131127.07238.beech@alaskaparadise.com> References: <200612131127.07238.beech@alaskaparadise.com>
next in thread | previous in thread | raw e-mail | index | archive | help
In response to Beech Rintoul <beech@alaskaparadise.com>: > I'm trying to learn how to use shar. I've read the manual. > > If I pass a directory to shar: > > shar foo > foo.shar > > Results in a shar file. Problem is that when I unpack it I just end up with an > empty directory. I probably need to pass it a flag or something, but I'm not > sure which one to use. > > How do I make a shar file out of a directory and ALL it's contents. shar needs to know all the files it's to put into the archive, it doesn't walk the tree for you. Thus you could do: share file1.txt file2.txt file3.txt > archive.shar to selectively grab only the specified files. When grabbing an entire directory tree, you can use the syntax: share `find \start\of\directory\tree -print` > archive.shar which is hinted at in the man page. The backticks cause the find command to be executed, and the output of find is given to shar. -- Bill Moran Collaborative Fusion Inc.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20061213153826.ddff57be.wmoran>