Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

List given directory size, directories, and files bash

echo -e "Enter your directory: c"
read -r dirname

echo '============ Total Number of Files Are  ============ '
echo
echo $(sudo find $dirname -type f | wc -l)
echo
echo '============ Total Number of Folders Are  ============ '
echo
echo $(sudo find $dirname -type d | wc -l)
echo
echo '============ Total Number of Size (MB)  ============ '
echo
sudo du -sm $dirname | cut -f 1
Comment

PREVIOUS NEXT
Code Example
Shell :: Comparing float or integers in if using bash 
Shell :: cffi not installed in dockerfile 
Shell :: react native requiring unknown modual "1" 
Shell :: debian auto login 
Shell :: bash directorry permision if 
Shell :: Continuous bash script to do tasks again after confirmation 
Shell :: terminal snap changes check percentage 
Shell :: refname master is ambiguous 
Shell :: how to check a path is file or director in shell script 
Shell :: terminal shortcuts 
Shell :: cmd if compare more than 
Shell :: change local Git email address to match GitHub account email 
Shell :: see postrouting rules linux 
Shell :: linux show bottom of file 
Shell :: install openzeppelin dependencies for hardhat enviroment 
Shell :: install web3modal 
Shell :: fish function to change php version .env 
Shell :: what is /bin/ash 
Shell :: linux route though zerotier 
Shell :: Replace karma with jest angular 
Shell :: git change upstream url 
Shell :: variety not working on ubuntu 22.04 
Shell :: ring check if the operating system is Linux or not 
Shell :: how to create a file and multiple lines to it in unix 
Shell :: output file contents linux 
Shell :: sed insert string at beginning of line matching pattern 
Shell :: why i cant choose to install window 10 pro when installing 
Shell :: spacemacs set font 
Shell :: cant find typesizes.h 
Shell :: kali linuz 
ADD CONTENT
Topic
Content
Source link
Name
1+3 =