You Asked: How Do You Check File Size in Linux?
Contents

Use ls -s to list file size, or if you prefer ls -sh for human readable sizes. For directories use du , and again, du -h for human readable sizes.

How do you check the size of a file?

How to do it: If it’s a file in a folder, change the view to Details and look at the size. If not, try right-clicking on it and selecting Properties. You should see a size measured in KB, MB or GB.

How do I check the size of a file in Unix?

How can I find the size of files and directories on UNIX. just enter du -sk without an argument (gives size of current directory, including subdirectories, in kilobytes). With this command the size of each file in your home directory and the size of each subdirectory of your home directory will be listed.

James H. Sterling

James H. Sterling

Environmental Science & Climate Journalist

James Sterling reports on renewable energy developments, climate policy, ecological conservation, and green tech innovations around the globe.

Share this article
Twitter Facebook Pinterest