"리눅스 time"의 두 판 사이의 차이

잔글 (로봇: 자동으로 텍스트 교체 (-<source lang='dos'> +<source lang='cli'>))
 
(사용자 2명의 중간 판 8개는 보이지 않습니다)
1번째 줄: 1번째 줄:
{{다른뜻|윈도우 time}}
==개요==
==개요==
;리눅스 time
;리눅스 time
5번째 줄: 4번째 줄:
*명령어 수행 시간 측정 리눅스 명령어
*명령어 수행 시간 측정 리눅스 명령어


==실습==
==실습 1==
<source lang='cli'>
<syntaxhighlight lang='console'>
[root@jmnote ~]# time
[root@zetawiki ~]# time


real 0m0.000s
real 0m0.000s
user 0m0.000s
user 0m0.000s
sys 0m0.000s
sys 0m0.000s
</source>
</syntaxhighlight>
<source lang='cli'>
<syntaxhighlight lang='console'>
[root@jmnote ~]# time sleep 2
[root@zetawiki ~]# time wc /etc/hosts
  9  26 232 /etc/hosts
 
real 0m0.050s
user 0m0.000s
sys 0m0.000s
</syntaxhighlight>
<syntaxhighlight lang='console'>
[root@zetawiki ~]# time sleep 2


real 0m2.004s
real 0m2.004s
user 0m0.000s
user 0m0.000s
sys 0m0.000s
sys 0m0.000s
</source>
</syntaxhighlight>
<source lang='cli'>
<syntaxhighlight lang='console'>
[root@jmnote ~]# time (for i in {0..1000000}; do A=1; done)
[root@zetawiki ~]# time (for i in {0..1000000}; do A=1; done)


real 0m4.109s
real 0m4.109s
user 0m3.884s
user 0m3.884s
sys 0m0.192s
sys 0m0.192s
</source>
</syntaxhighlight>
 
==실습 2==
<syntaxhighlight lang='console'>
jmnote@zetawiki:~$ time ( sleep 2 )
 
real 0m2.001s
user 0m0.000s
sys 0m0.000s
</syntaxhighlight>
<syntaxhighlight lang='console'>
jmnote@zetawiki:~$ time ( echo hello; sleep 2 )
hello
 
real 0m2.001s
user 0m0.000s
sys 0m0.000s
</syntaxhighlight>


==같이 보기==
==같이 보기==
*[[리눅스 times]]
{{z컬럼3|
*[[시스템 시간]]
* [[시간]]
*[[시간]]
* [[윈도우 time]]
* [[시스템 시간]]
* [[리눅스 times]]
* [[Bash 수행시간 측정]]
}}


==참고 자료==
==참고==
*https://en.wikipedia.org/wiki/Time_(Unix)
* {{영어위키백과|Time (Unix)}}


[[분류: /usr/bin]]
[[분류: /usr/bin]]
[[분류: 시간]]
[[분류: 시간]]

2024년 7월 6일 (토) 23:34 기준 최신판

1 개요[ | ]

리눅스 time
/usr/bin/time
  • 명령어 수행 시간 측정 리눅스 명령어

2 실습 1[ | ]

[root@zetawiki ~]# time

real	0m0.000s
user	0m0.000s
sys	0m0.000s
[root@zetawiki ~]# time wc /etc/hosts
  9  26 232 /etc/hosts

real	0m0.050s
user	0m0.000s
sys	0m0.000s
[root@zetawiki ~]# time sleep 2

real	0m2.004s
user	0m0.000s
sys	0m0.000s
[root@zetawiki ~]# time (for i in {0..1000000}; do A=1; done)

real	0m4.109s
user	0m3.884s
sys	0m0.192s

3 실습 2[ | ]

jmnote@zetawiki:~$ time ( sleep 2 )

real	0m2.001s
user	0m0.000s
sys	0m0.000s
jmnote@zetawiki:~$ time ( echo hello; sleep 2 )
hello

real	0m2.001s
user	0m0.000s
sys	0m0.000s

4 같이 보기[ | ]

5 참고[ | ]

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}