ICT: Diary
D: 28 W: 05

< November 2011 >
Sun Mon Tue Wed Thu Fri Sat
 12345
6789101112
13141516171819
20212223242526
27282930 

Based on notaweblog.php by joshua stein

[ ] Friday, 11 November 2011 [ ]

DUID

Wanted to generate a DUID so that I could mount my htc ion easily, ended up with the following from the flashboot code:

 cat /dev/arandom | tr -cd "a-f0-9" | fold -w 16 | head -1

This command outputs the arandom device, which is piped to translate characters (tr(1)), using the complement and delete switches together removes all characters that don't match the regex a-f0-9, this is the piped to fold which folds the output at a width of 16 characters - the length of the DUID, and we then just take the first line using head.


$Id: diary,v 1.38 2025/01/01 22:43:54 fred Exp $