[aklug] Re: Self-extracting Archive

From: Matt Grimm <matt.t.grimm@gmail.com>
Date: Fri May 08 2009 - 19:53:52 AKDT

>
> mktemp will work (i.e. , create the directory you told it to create) if you
> do not use this feature
>
How odd -- mktemp will happily create your non-unique temporary
file/directory *as long as it does not already exist.* If the file or dir
does exist, mktemp hangs indefinitely, which is probably what caused Chris'
original script to hang.

Note that all of these examples were hung until I hit ^C:

$ ls selfextract.1029349304
selfextract.1029349304
$ mktemp -d selfextract.1029349304
^C
$ mktemp -d /tmp/selfextract.1029349304
^C
$ mktemp -p /tmp -d selfextract.1029349304
^C
$ mktemp -p /tmp selfextract.1029349304
^C
$ mktemp selfextract.1029349304
^C
$

On Fri, May 8, 2009 at 6:00 PM, Marc Grober <marc@interak.com> wrote:

> some apples and oranges there....
> all -p does is add a prefix, and it is not universally
> available.
> mktemp -d /tmp/selfextract.XXXXXX
> is going to do the same thing as
> mktemp -p /tmp -d selfextract.XXXXXX
> I believe.....
>
> the XXXX is the reason to use mktemp in one sense, as it
> uses the XXXXXs for a template, but mktemp will work (i.e. ,
> create the directory you told it to create) if you do not
> use this feature.
>
> Christopher Howard wrote:
> > -----BEGIN PGP SIGNED MESSAGE-----
> > Hash: SHA1
> >
> > Matt Grimm wrote:
> >> Chris,
> >>
> >> You are trying to create a temporary directory name, but aren't giving
> >> mktemp anyplace to insert random data. Try this instead:
> >>
> >> mktemp -p /tmp -d selfextract.XXXXXXXXXX
> >>
> >
> > Ah, yes... that fixed the problem.
> >
> > I'm going to go change my name now.
> >
> > - --
> > Christopher Howard
> > http://indicium.us
> > http://theologia.indicium.us
> >
> > I digitally sign /all/ of my e-mails via PGP. If you receive any e-mails
> > supposedly from me without my valid PGP signature, please take
> > additional steps to verify the authenticity of the message.
> > -----BEGIN PGP SIGNATURE-----
> > Version: GnuPG v1.4.9 (GNU/Linux)
> > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
> >
> > iEYEARECAAYFAkoE4lwACgkQQ5FLNdi0BcUioQCeKiHSeFzzlpLMbN1hocIKl6Uz
> > qugAnjb0Wcl5NWqzoJM4V92Rsfmvj9Q9
> > =Hz62
> > -----END PGP SIGNATURE-----
> > ---------
> > To unsubscribe, send email to <aklug-request@aklug.org>
> > with 'unsubscribe' in the message body.
> >
>
>
>
> -- Binary/unsupported file stripped by Ecartis --
> -- Type: application/x-pkcs7-signature
> -- File: smime.p7s
> -- Desc: S/MIME Cryptographic Signature
>
>
> ---------
> To unsubscribe, send email to <aklug-request@aklug.org>
> with 'unsubscribe' in the message body.
>
>

---------
To unsubscribe, send email to <aklug-request@aklug.org>
with 'unsubscribe' in the message body.
Received on Fri May 8 19:54:22 2009

This archive was generated by hypermail 2.1.8 : Fri May 08 2009 - 19:54:22 AKDT