jihoonlucaskim.velog
로그인
jihoonlucaskim.velog
로그인
[Linux] 파일 개수 및 디렉토리(폴더) 개수 세기
Lucas Kim
·
2023년 2월 4일
팔로우
0
Directory
command
count
file
linux
개수
리눅스
자주쓰는
커멘드
파일
폴더
0
파일 개수
ls -l | grep ^- | wc -l
폴더 개수
ls -l | grep ^d | wc -l
설명
ls
: 현 폴더의 파일 및 폴더 출력
-l
: line 단위로 한줄 씩 출력
grep
: grep은 특정 조건을 만족시키는 경우만 보여주는 필터
^-
: file을 grep
^d
: directory를 grep
wc
: wc는 word count로 출력물의 개수를 세기
-l
: line 단위로 세기
Lucas Kim
AI/ML Research Engineer
팔로우
다음 포스트
[Algorithm] Quick Sort (C++)
0개의 댓글
댓글 작성