How many GB is my file Linux?
- –l – displays a list of files and directories in long format and shows the sizes in bytes.
- –h – scales file sizes and directory sizes into KB, MB, GB, or TB when the file or directory size is larger than 1024 bytes.
- –s – displays a list of the files and directories and shows the sizes in blocks.
How do I find the size of a folder in Ubuntu? Answer: Use the du Command
You can use the du command (short for “disk usage”) to get the size of directory from the command line in Ubuntu. It basically summarize disk usage of the set of FILEs, recursively for directories.
How can I see MB in Linux? Answer: Use the –block-size Option
If you strictly want ls command to show the file sizes in MB or KB you can use the ‘–block-size=SIZE’ option. It scale file sizes by SIZE before printing them; e.g., –block-size=M prints sizes in units of 1,048,576 bytes.
How do I tell the size of a file?