cat /dev/urandom | LC_ALL=C tr -dc "[:alnum:]" | fold -w 16 | head -n 10
Lp5LOAPpjMuSf9pL
vOskS16pjrnV4VoK
rwplMGnZazsxDP9U
moKcLNhaVBx54Mxa
2eW2Gc4cStFhPskg
OHyUFyWm4OYIBpLu
x4e9zmTY6938uugN
8KR8qBqY2DRzdqyW
EOULb0zutufqeZk9
5iZkCP2OT9rxycGv
Expression | Semantics |
---|---|
alnum |
Matches alpha-numeric characters |
alpha |
Matches alphabetic characters |
blank |
Matches spaces or tabs |
cntrl |
Matches control characters |
digit |
Matches numeric digits |
graph |
Matches non-space printing characters |
lower |
Matches lower case letters |
print |
Matches printable characters |
punct |
Matches punctuation symbols |
space |
Matches spaces, tabs, returns, and newlines |
upper |
Matches upper case letters |
xdigit |
Matches hexadecimal digits |
如果需要特别复杂的密码可以试一下:
cat /dev/urandom | LC_ALL=C tr -dc "[:graph:]" | fold -w 16 |head -10
#/;}vHV[hI5TGTDI
u[Pg:8%mLxcfdUXr
!R@RBZMeW!DNd2Wv
Mng73Oi!kPCUtx%`
OVU^WUpKU_gp[w2l
_Q;^z5,EPT%?G|np
hcUq=JstGKtQEMDK
+(A9o_4’ODs{KW~9
fa!{d)a(N:XFR`%
!+e8F(uKlQ:#sc]4
转载请注明:爱开源 » 随即产生 16位长度 密码