How many files and folders are there in a given folder?

 
# cd /var/www/html/owncloud/data
 
# for t in files links directories; do echo `find . -type ${t:0:1} | wc -l` $t; done 2> /dev/null
217 files
0 links
244 directories

 

How big is the folder?

Alternative 1

# du -h /var/www/html/owncloud/data
.
.
.
156M    /var/www/html/owncloud/data

 

Alternative 2

# cd /home
# du -hs * | sort -hr
21G     sorin
20G     kristina
16K     lost+found

 

Alternative 3

# ncdu /home/sorin
 

If not installed, run this.

# sudo apt install ncdu

 

 

Source

https://superuser.com/questions/554319/bash-display-each-sub-directory-size-in-a-list-format-using-1-line-command

 

 

 

Stop Spam Harvesters, Join Project Honey Pot

 

Get a free SSL certificate!

 

The leading nonprofit defending digital privacy, free speech, and innovation.

 

The Linux Foundation provides a neutral, trusted hub for developers and organizations to code, manage, and scale open technology projects and ecosystems.

 

Kubuntu is an operating system built by a worldwide community of developers, testers, supporters and translators.

 

 43ef5c89 CanonicalUbuntudarktext