![]() To see the full description and argument list of du command, refer to the man du. Getting Size of Directory in Linux with du In this article, we'll take a look at some of the most common usages of the du commands, including but not limited to du -sh, du -ch, and du -max-depth. So what's the shortest and easiest way to get the size of a directory in Linux, you ask? To get the total size of a directory in Linux, you can use the du (disk-usage) command. The reason is that ls returns meta-data for the directories, not the actual size. The first thing you'll notice using that command is that the size of directories is always shown as 4096 bytes (or 4,0K if you're using ls -lh) even though they contain files that are greater than 4 KB in size. In Linux, ls -l would list the files and directories in a particular path, with their names, dates, and sizes (disk usage).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |