"/dev/null"의 두 판 사이의 차이

잔글 (봇: 자동으로 텍스트 교체 (-<source +<syntaxhighlight , -</source> +</syntaxhighlight>))
 
(사용자 3명의 중간 판 10개는 보이지 않습니다)
1번째 줄: 1번째 줄:
{{다른뜻|비트버킷}}
==개요==
==개요==
;/dev/null
;/dev/null
7번째 줄: 8번째 줄:


==실습==
==실습==
<source lang='dos'>
<syntaxhighlight lang='console'>
[root@jmnote ~]# echo hello
[root@zetawiki ~]# echo hello
hello
hello
[root@jmnote ~]# echo hello > /dev/null
[root@zetawiki ~]# echo hello > /dev/null
[root@jmnote ~]#  
[root@zetawiki ~]#  
</source>
</syntaxhighlight>
:→ [[표준출력]](stdout)을 버림
:→ [[표준출력]](stdout)을 버림


<source lang='dos'>
<syntaxhighlight lang='console'>
[root@jmnote ~]# a.sh
[root@zetawiki ~]# a.sh
-bash: a.sh: command not found
-bash: a.sh: command not found
[root@jmnote ~]# a.sh 2> /dev/null
[root@zetawiki ~]# a.sh 2> /dev/null
[root@jmnote ~]#  
[root@zetawiki ~]#  
</source>
</syntaxhighlight>
:→ [[표준오류]](stderr)를 버림
:→ [[표준오류]](stderr)를 버림


==같이 보기==
==같이 보기==
*[[null]]
* [[리눅스 파일용량 0으로 만들기]]
*[[UNIX철학]]
* [[null]]
*[[표준스트림]]
* [[UNIX철학]]
*[[/dev/zero]]
* [[표준스트림]]
*[[/dev/random]]
* [[/dev/zero]]
*[[장치 파일]]
* [[/dev/random]]
*[[rm]]
* [[/dev/stdin, stdout, stderr]]
*[[표준스트림]]
* [[장치 파일]]
* [[rm]]


==참고 자료==
==참고==
*http://en.wikipedia.org/wiki//dev/null
* {{위키백과|널 장치}}
* {{영어 위키백과|Null_device}}


[[분류: /dev]]
[[분류: /dev]]

2021년 7월 17일 (토) 18:00 기준 최신판

  다른 뜻에 대해서는 비트버킷 문서를 참조하십시오.

1 개요[ | ]

/dev/null
null device, bit bucket, black hole
널 장치, 비트 버킷, 블랙홀
  • 리눅스 null 장치 파일
  • 주로 불필요한 출력 스트림을 버리는 곳으로 사용됨

2 실습[ | ]

[root@zetawiki ~]# echo hello
hello
[root@zetawiki ~]# echo hello > /dev/null
[root@zetawiki ~]#
표준출력(stdout)을 버림
[root@zetawiki ~]# a.sh
-bash: a.sh: command not found
[root@zetawiki ~]# a.sh 2> /dev/null
[root@zetawiki ~]#
표준오류(stderr)를 버림

3 같이 보기[ | ]

4 참고[ | ]

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