프로그래밍 언어/Shell script

Linux에서 Nanosecond(나노초) 단위까지 시간 출력하기

fdsa_000 2017. 10. 17. 20:54

date +"%Y-%m-%d %H:%M:%S.%N"


1
2
[user@vm ~]$ date +"%Y-%m-%d %H:%M:%S.%N"
2017-10-17 20:47:09.783257914
cs


%Y: 연

%m: 월

%d: 일

%H: 시

%M: 분

%S: 초

%N: 나노초



  • 참고 사이트

Linux command to get time in milliseconds, https://stackoverflow.com/questions/16548528/linux-command-to-get-time-in-milliseconds

How To Format Date For Display or Use In a Shell Script, https://www.cyberciti.biz/faq/linux-unix-formatting-dates-for-display/