User Tools

Site Tools


how_to_count_all_the_files_in_a_directory

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
how_to_count_all_the_files_in_a_directory [2016/08/03 23:47] walkeradminhow_to_count_all_the_files_in_a_directory [2017/02/28 18:00] – external edit 127.0.0.1
Line 1: Line 1:
 ====== How to count all the files in a directory ====== ====== How to count all the files in a directory ======
-\\ +<color darkorange>2016</color> 
 + 
 +---- 
 \\  \\ 
     ls -l -R /path | wc -l     ls -l -R /path | wc -l
Line 10: Line 13:
 \\  \\ 
 \\  \\ 
 +Or:
 +\\ 
 +\\ 
 +#Delete subfolders from "/home/charles/testarea"\\ 
 +\\ 
 +#clear terminal window\\ 
 +echo -e "\033c"\\ 
 +\\ 
 +find "/home/charles/testarea" -mindepth 1  -mtime +6 -type d  | while read x; do echo "---------" ; echo Deleting folder "$x" ; rm -R "$x";
 +\\ 
 +\\  
 +done
  
how_to_count_all_the_files_in_a_directory.txt · Last modified: 2023/03/09 22:35 by 127.0.0.1