4 ms·
I believe v4 is what you actually want [1]. By default it looks like `uuid` generates a v1 id, which as you said will produce duplicates if you call it too quic
by war1025 6y ago
I believe v4 is what you actually want [1]. By default it looks like `uuid` generates a v1 id, which as you said will produce duplicates if you call it too quickly.
Maybe your tool is different from the one installed on my machine because when I use the `-r` option I just get garbage back. This leads me to believe it's returning the uuid as raw bytes when I pass that option.
$ uuid
97af2898-cb54-11ea-8d75-176c10241ffd
$ uuid -v4
0b8d75f5-a148-466c-b1b5-9d9d1022c327
$ uuid -r
����T�����.
[1] https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random) https://en.wikipedia.org/wiki/Universally_unique_identifier#...
- moviuro 6y agoI checked in my code, I actually used `uuidgen`, not `uuid`. Thus the mixup!