랜덤 패스워드 생성 명령어 (32 글자)
testuser@localhost:~$ < /dev/urandom tr -dc A-Za-z0-9 | head -c32; echo
u5etCB4B9oGr9wJbtjqFMoNcwEwEChsw
랜덤 패스워드 생성 명령어 (64 글자)
testuser@localhost:~$ < /dev/urandom tr -dc A-Za-z0-9 | head -c64; echo
eforJvkfgfy9LOueWrWAJMrKZp4CilEYzPt54K0SJ2QFYpTI0HCfGuWHUfpoI68b
리눅스 tr 명령어 (/usr/bin/tr)
- 리눅스 텍스트 필터의 한가지
- 2개의 문자집합을 파라미터로 입력받아 대응되는 문자로 변환
[root@zetawiki ~]# echo hello | tr a-z A-Z
HELLO
[root@zetawiki ~]# echo cheer | tr abcdefghijklmnopqrstuvwxyz hijklmnopqrstuvwxyzabcdefg
jolly