Check size of Folder using CMD

Get Size of ALL NON-HIDDEN files

Use the du command:

du -sh -- *

will give you the cumulative disk usage of all non-hidden directories, files etc in the current directory in human-readable format.

You will get output like this:

$ du -sh -- *

  0B Applications

1.9M Classification.ipynb

459M DBpedia

28M Deep-learning-for-sentiment-analysis

16G Desktop

997M Documents

60G Downloads

4.0K Hello World.ipynb

2.2G LSTM-Sentiment-Analysis

41M LearningSourceControl

13G Library

184K Movies

424K Music

4.0K NLP.ipynb

1.3M ParallelDots-Java-API

9.8M Pictures

  0B Public

84M RNTN

376K RNTN_2

4.0K RemoteSystemsTempFiles

8.0G summarizer

  0B Sites

568M SourceControl

Get Free Space into File System

You can use the df command to know the free space in the filesystem containing the directory:

df -h 

You will get output like this:

$ df -hFilesystem      Size   Used  Avail Capacity iused               ifree %iused  Mounted on/dev/disk1s1   234Gi  221Gi  1.5Gi   100% 2683182 9223372036852092625    0%   /devfs          196Ki  196Ki    0Bi   100%     678                   0  100%   /dev/dev/disk1s4   234Gi   10Gi  1.5Gi    88%      10 9223372036854775797    0%   /private/var/vmmap -hosts       0Bi    0Bi    0Bi   100%       0                   0  100%   /netmap auto_home    0Bi    0Bi    0Bi   100%       0                   0  100%   /home/dev/disk2s3   172Mi  169Mi  2.7Mi    99%     157          4294967122    0%   /Volumes/Firefox

Get Total size Acquired by Folder(Directory):

$ sudo du -hs
60G .