pstein
October 2, 2011, 2:30am
1
I would like to list all files in a directory tree but with a prepended digest hash code (like CRC32). CRC32 is not a MUST. If suitable another hash code can be used as well. In case of CRC32 the listing should look like
3765AC \usr\bin\spool
23CE99 \usr\bin\spool\list.h
...
11AA04 \etc\apt\sources.list
How can I achieve this?
Peter
Scott
October 2, 2011, 5:09am
2
$ find . -type f | xargs crc32
8ffca073 ./Dir1/file3
6734ef32 ./Dir2/file4
2b985a52 ./file1
ea7784a8 ./file2
pstein
October 2, 2011, 5:44am
3
Thank you but this gives me (under Ubuntu 11.04) the following error:
xargs: crc32: No such file or directory
I assume crc32 and/or xargs is not available here.
Any other solution?
Peter
Scott
October 2, 2011, 5:50am
4
It's just a Perl script.
Ubuntu Manpage: crc32 - compute CRC-32 checksums for the given files
Use your Ubuntu package manager - whatever that is - to install it.