32
9
I am using SSH to connect to a CentOS server and I want to get the file in mb of some files and folders, how can I do it?
32
9
I am using SSH to connect to a CentOS server and I want to get the file in mb of some files and folders, how can I do it?
39
use the du command
du -m filename
19
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
1much better than accepted solution – zookastos – 2017-08-30T05:50:01.017
du -sh /yourpath/* to list all directories in a given path and summarized sizes of their contents – Fanky – 2019-10-07T08:31:21.383
29If you use
du -h
instead, it'll chose (and print) the appropriate units. – Dentrasi – 2010-06-22T21:28:27.48711If you use du -ms folder, it will report the size of the folder contents. – KeithB – 2010-06-22T21:35:49.780
1@TheBlackBenzKid wc -c – AbsoluteƵERØ – 2016-11-14T17:56:42.627
1Is there a way where we can see the units - example mb, kb or any other information? – TheBlackBenzKid – 2013-03-25T09:58:40.547