Istvan Gabor schreef:
Hello:
I am using the following syntax to create an md5 file containing all the md5 sums recursively:
find . -type f -print0 | xargs -0 md5sum > ~/tmp/foo.md5
Unfortunately this method crates an md5 file in which the order of the files seems to be random. Eg:
4e0a0c9d1c2d94cf8481a3e32f95b55b ./Album1/07.mp3 442765056a35156e9d6d19ccde5a0801 ./Album1/11.mp3 8c794bbfdad7e00860739d1852c3db86 ./Album1/09.mp3 489ffb1566b1bd1f21625c6f9fcf19d8 ./Album1/06.mp3 477baacaf7e95ea483d9ed1d94bed0bb ./Album1/10.mp3
etc.
How could I get the files and subdirectories sorted in alphabetical order?
erm... sort? :-) You have two fields separated by whitespace, so don't have to do anything fancy, just specify that the key is the second field: sort --key=2 ~/tmp/foo.md5 > ~/tmp/bar.md5 Regards, -- Jos van Kan registered Linux user #152704 -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org