Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

unix count files in directory with specific name

ls | wc -l #Count files on current directory
ls path/to/dir | wc -l #Count files on specific directory path
ls | grep "specific_regex" | wc -l #Count files in dir with specifig 
# regex filename
 
PREVIOUS NEXT
Tagged: #unix #count #files #directory #specific
ADD COMMENT
Topic
Name
4+3 =