Hi
I have to find size of subdirectory and automate it in CRON.

Eg: parent directory name is NVBKP inside it there are several subdirectories
I want to get the size of recent two subdirectories.

I have tried ls -ltr diretory path | tail -2
But it is providing only size of the folder not the contents of that folder.

For eg if there are 5 subdirectories in NVBKP say
a
b
c
d
e

then i need complete size of d and e.
say complete size of d and e is 25 gb
but when i am using ls -ltr directory path| tail -2 it is giving me only size of folder d and e i.e 256 mb or something but not its contents.

Kindly suggest.