IBM Support

Determing file/directory sizes in Linux

Question & Answer


Question

How do I detemine the size of a file and/or directory?

Answer

From the Linux prompt, entering ls -lh will display details about the file and display the file size in readable format.

Entering ls -lhR will display all files in the directory, with their respective sizes and a total for all files.

[{"Product":{"code":"SSULQD","label":"IBM PureData System"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":null,"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"1.0.0","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Historical Number

NZ180625

Document Information

Modified date:
17 October 2019

UID

swg21573308