Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 | 31 |
Tags
- error
- 핑거스타일
- Numpy
- Python
- 프로그래머스
- pandas
- Selenium
- 채보
- SSH
- Linux
- ubuntu
- 명령어
- VS Code
- JSON
- 기타 연주
- C#
- LIST
- Visual Studio
- mysql
- OpenCV
- Docker
- pytorch
- windows forms
- YOLO
- C++
- 오류
- C
- 기타
- paramiko
- label
Archives
- Today
- Total
기계는 거짓말하지 않는다
Linux 파일, 디렉터리 검색 find 명령어 본문
다음은 간단한 사용 예이다.
find "*.mp4" # 현재 경로의 모든 mp4 파일, 디렉터리 검색
find . -name "*.mp4" # 현재 경로와 현재 경로 하위의 모든 mp4 파일, 디렉터리 검색
find . / -name "*.mp4" # 최상위 경로와 최상위 경로 하위의 모든 mp4 파일, 디렉터리 검색
find . -perm 0777 # 현재 경로와 현재 경로 하위의 0777 권한 파일, 디렉터리 검색
find와 xargs, grep을 사용하여 검색어가 파일 내부에 포함되었는지 확인도 가능하다.
# 현재 경로와 현재 경로 하위의 모든 txt 파일에서 ABCD가 txt 파일 내용에 포함된 파일을 찾는다.
find . -type f -name "*.txt" | xargs grep "ABCD"
'Linux' 카테고리의 다른 글
Ubuntu apt update GPG error (0) | 2023.03.11 |
---|---|
Ubuntu Nouveau 비활성화 (NVIDIA Driver Setup) (0) | 2023.03.11 |
Docker 컨테이너 이미지로 저장, 이미지 백업, 이미지 불러오기 (commit, save, load) (0) | 2023.02.28 |
Docker ps 출력 포맷 설정 (0) | 2023.02.25 |
Ubuntu 한글 설정 (locale) (0) | 2023.02.25 |
Comments