LINUX
리눅스 서브 디렉토리 포함 파일수 구하기
OJR
2010. 4. 23. 15:02
리눅스 서브 디렉토리 포함 파일수 구하기
ls -R -s | wc -l
현재 디렉토리에 있는 파일수
ls -s | wc -l
현대 위치에 있는 디렉토리 수 구하기
$ ls -l | grep ^d | wc -l
참고
linux man ls - https://man7.org/linux/man-pages/man1/ls.1.html
ls(1) - Linux manual page
ls(1) — Linux manual page LS(1) User Commands LS(1) NAME top ls - list directory contents SYNOPSIS top ls [OPTION]... [FILE]... DESCRIPTION top List information about the FILEs (the current directory by default). Sort
man7.org
macOS man ls - https://ss64.com/osx/ls.html
ls man page Man Page - macOS - SS64.com
List directory contents. The -1, -C, -x, and -l options all override each other; the last one specified determines the format used. The -c and -u options override each other; the last one specified determines the file time used. The -B, -b, -w, and -q opti
ss64.com