Re: How can Emacs get a unique ID per Linux reboot?

Johan =?iso-8859-1?Q?Myr=E9en?= (johan.myreen@setec.fi)
Tue, 01 Jun 1999 15:53:44 +0000


Riley Williams wrote:

> > neither suffices for a unique ID per reboot. (I think btime is
> > broken whereas uptime is OK.)
>
> In that case, try the following variant thereof...
>
> > echo $[`TZ=UTC date +%s`-`cut -d . -f 1 < /proc/uptime`]

Of course, things aren't as simple as this, you will have to take care
of the race in the above construct. Try the command a few times, and
you'll see that you get varying results.

Johan Myréen
jem@iki.fi

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/