Generate a random filename in unix shell

前端 未结 14 679
说谎
说谎 2020-12-22 23:39

I would like to generate a random filename in unix shell (say tcshell). The filename should consist of random 32 hex letters, e.g.:

c7fdfc8f409c548a10a0a89a7         


        
14条回答
  •  一整个雨季
    2020-12-22 23:56

    Another thing you can add is running the date command as follows:

    date +%S%N
    

    Reads nonosecond time and the result adds a lot of randomness.

提交回复
热议问题