The Computer Oracle

How to get file/folder size with SSH on linux?

--------------------------------------------------
Hire the world's top talent on demand or became one of them at Toptal: https://topt.al/25cXVn
and get $2,000 discount on your first invoice
--------------------------------------------------

Music by Eric Matyas
https://www.soundimage.org
Track title: Music Box Puzzles

--

Chapters
00:00 How To Get File/Folder Size With Ssh On Linux?
00:13 Accepted Answer Score 44
00:21 Answer 2 Score 13
00:33 Answer 3 Score 24
00:47 Thank you

--

Full question
https://superuser.com/questions/155507/h...

--

Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...

--

Tags
#linux #ssh

#avk47



ACCEPTED ANSWER

Score 44


use the du command

du -m filename



ANSWER 2

Score 24


 du -msh FolderName 

will get the size with units. Unlike using -h, this will show a single size, while -h shows all the individual files within the folder.
e.g.

349M    FolderName 



ANSWER 3

Score 13


du is the primary tool for this, but if you're looking for something more interactive, I quite like ncdu

ncdu_screenshot