Re: Shar question

2006-12-13 Thread Dan Nelson
In the last episode (Dec 13), Beech Rintoul said:
> 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.

If you want to get sneaky, you can use bsdtar, since that's one of its
supported output formats:

tar --format=shar -cvf foo.shar foo

-- 
Dan Nelson
[EMAIL PROTECTED]
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Shar question

2006-12-13 Thread Beech Rintoul
On Wednesday 13 December 2006 11:38, Bill Moran wrote:
> In response to Beech Rintoul <[EMAIL PROTECTED]>:
> > 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.

OK, now I understand. The manual was a bit unclear on that. Thanks,

Beech

-- 
---
Beech Rintoul - Sys. Administrator - [EMAIL PROTECTED]
/"\   ASCII Ribbon Campaign  | Alaska Paradise Travel
\ / - NO HTML/RTF in e-mail  | 201 East 9Th Avenue Ste.310
 X  - NO Word docs in e-mail | Anchorage, AK 99501
/ \  - Please visit Alaska Paradise - http://www.alaskaparadise.com
---













pgp76jFZChM12.pgp
Description: PGP signature


Re: Shar question

2006-12-13 Thread Bill Moran
In response to Beech Rintoul <[EMAIL PROTECTED]>:

> 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.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Shar question

2006-12-13 Thread Beech Rintoul
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.

TIA

Beech
-- 
---
Beech Rintoul - Sys. Administrator - [EMAIL PROTECTED]
/"\   ASCII Ribbon Campaign  | Alaska Paradise Travel
\ / - NO HTML/RTF in e-mail  | 201 East 9Th Avenue Ste.310
 X  - NO Word docs in e-mail | Anchorage, AK 99501
/ \  - Please visit Alaska Paradise - http://www.alaskaparadise.com
---













pgpx1g5yHQb9Q.pgp
Description: PGP signature