Use the tree command to check directory size in Ubuntu Now, you can have a better idea of how it was sized around 16 gigs!īut the du command has a lot more to offer and if you want to utilize it to its max potential, I'd recommend checking out our detailed guide: du path_to_file_or_directoryįor example, I will be getting details of Directory and use -h option to get output in human-readable form: du -h Directoryīut how could a directory containing one sub-directory worth 1.6 Gb can sum around 16 gigs? Because by default, it only shows details of sub-directories.Īnd by using -a option, you can include files, making it a more sensible output: du -ah Directory The du (disk usage) command is a popular solution for checking directory sizes in Linux. Use the du command to check directory size in Ubuntu Let's start with the 'official' command for checking the size of a directory. Like most things in Linux, there are several ways to do it. For now, the bigger question is how do you get the directory size in Ubuntu terminal? I'll explain the logic behind 4k directory size later. However, the directory size is always displayed as 4k. The ls command shows the file size in human-readable format with ls -lh.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |