Messages in this thread | | | Date | Tue, 01 Jun 1999 15:53:44 +0000 | From | Johan Myréen <> | Subject | Re: How can Emacs get a unique ID per Linux reboot? |
| |
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/
| |