"리눅스 파일 찾기"의 두 판 사이의 차이

잔글 (봇: 자동으로 텍스트 교체 (-</source> +</syntaxhighlight>, -<source +<syntaxhighlight ))
 
(사용자 2명의 중간 판 4개는 보이지 않습니다)
4번째 줄: 4번째 줄:


==전체 폴더에서 찾기==
==전체 폴더에서 찾기==
;명령어
{{소스헤더|명령어}}
<source lang='bash'>
<syntaxhighlight lang='bash'>
find / -name 파일명
find / -name 파일명
</source>
</syntaxhighlight>
<source lang='bash'>
<syntaxhighlight lang='bash'>
find / -name '파일명'
find / -name '파일명'
</source>
</syntaxhighlight>
<source lang='bash'>
<syntaxhighlight lang='bash'>
find / -name "파일명"
find / -name "파일명"
</source>
</syntaxhighlight>
:→ [[와일드카드]] 사용 가능
:→ [[와일드카드]] 사용 가능


;실행예시
{{소스헤더|실행예시}}
<source lang='dos'>
<syntaxhighlight lang='console'>
[root@jmnote ~]# find / -name php
[root@zetawiki ~]# find / -name php
/var/lib/php
/var/lib/php
/usr/lib64/php
/usr/lib64/php
/usr/share/php
/usr/share/php
/usr/bin/php
/usr/bin/php
</source>
</syntaxhighlight>
<source lang='dos'>
<syntaxhighlight lang='console'>
[root@jmnote ~]# find / -name httpd.conf
[root@zetawiki ~]# find / -name httpd.conf
/etc/httpd/conf/httpd.conf
/etc/httpd/conf/httpd.conf
</source>
</syntaxhighlight>
<source lang='dos'>
<syntaxhighlight lang='console'>
[root@jmnote ~]# find / -name '*.php'
[root@zetawiki ~]# find / -name '*.php'
/var/www/html/index.php
/var/www/html/index.php
/root/a.php
/root/a.php
/tmp/c.php
/tmp/c.php
</source>
</syntaxhighlight>
<source lang='dos'>
<syntaxhighlight lang='console'>
[root@jmnote ~]# find / -name php.in
[root@zetawiki ~]# find / -name php.in
[root@jmnote ~]# find / -name php.in*
[root@zetawiki ~]# find / -name php.in*
/etc/php.ini.rpmnew
/etc/php.ini.rpmnew
/etc/php.ini
/etc/php.ini
</source>
</syntaxhighlight>


==현재 폴더(+하위폴더)에서 찾기==
==현재 폴더(+하위폴더)에서 찾기==
;명령어
{{소스헤더|명령어}}
<source lang='bash'>
<syntaxhighlight lang='bash'>
find ./ -name 파일명
find ./ -name 파일명
</source>
</syntaxhighlight>
<source lang='bash'>
<syntaxhighlight lang='bash'>
find ./ -name "파일명"
find ./ -name "파일명"
</source>
</syntaxhighlight>


;실행예시
{{소스헤더|실행예시}}
<source lang='dos'>
<syntaxhighlight lang='console'>
[root@jmnote ~]# find ./ -name "*.php"
[root@zetawiki ~]# find ./ -name "*.php"
./b.php
./b.php
</source>
</syntaxhighlight>


==같이 보기==
==같이 보기==

2020년 11월 30일 (월) 20:15 기준 최신판

리눅스에서 파일 찾기
리눅스 파일 찾기
리눅스 파일 검색

1 전체 폴더에서 찾기[ | ]

명령어
find / -name 파일명
find / -name '파일명'
find / -name "파일명"
와일드카드 사용 가능
실행예시
[root@zetawiki ~]# find / -name php
/var/lib/php
/usr/lib64/php
/usr/share/php
/usr/bin/php
[root@zetawiki ~]# find / -name httpd.conf
/etc/httpd/conf/httpd.conf
[root@zetawiki ~]# find / -name '*.php'
/var/www/html/index.php
/root/a.php
/tmp/c.php
[root@zetawiki ~]# find / -name php.in
[root@zetawiki ~]# find / -name php.in*
/etc/php.ini.rpmnew
/etc/php.ini

2 현재 폴더(+하위폴더)에서 찾기[ | ]

명령어
find ./ -name 파일명
find ./ -name "파일명"
실행예시
[root@zetawiki ~]# find ./ -name "*.php"
./b.php

3 같이 보기[ | ]

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