sort -R file
-R, --random-sort(sort by random hash of keys)
How random sort works in linux? What type of functions are used by system?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
It simply hashes the input keys then sorts on that hash value.
The choice of hash function is a random one, usually based on a simple internal pseudo-random number generator but you can change the source of this randomness by using the
--random-source=FSPECoption.This will use
FSPECas the source of randomness for selecting the hash information, typically/dev/randomor its kin.