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. In this article, we'll take a look at some of the most common usages of the du commands, including...
If you omit sudo the du command will print “du: cannot read directory”. s - Display only the total size of the specified directory, do not display file size totals for subdirectories. h - Print sizes in a human-readable format (h). /var - The path to the directory you want to ...
Get the total size of current directory. The du command can be use to determine the total size of file in current directory. The example below show the du command use with -s (summarize) and -h (human readable format) option to summaries the size of disk space taken by current directory...
Thedfcommand stands for disk free. It shows the total, used, and available space sizes of the file system. The-hflag is used to display the sizes human-readable. df-h /tmp Use thetreeCommand to Get the Size of a Directory in Linux ...
Method #3: Use the ncdu Command to Get Directory Size in Linux Thencdu(NCurses Disk Usage) tool is similar to thetreecommand in the level of details of the command’s output. The utility displays the disk usage in detail. The typical usage is simply calling the utility at the command li...
"logsDirectorySizeLimit": 35, "detailedErrorLoggingEnabled": false, "use32BitWorkerProcess": true, "webSocketsEnabled": false, "alwaysOn": false, "appCommandLine": "", "managedPipelineMode": "Integrated", "virtualApplications": [ { "virtualPath": "/", "physicalPath": "site\\wwwroot", ...
Flexibility:The “du” command provides a wide range of options that can be used to customize the output, such as displaying sizes in human-readable format and providing a summary of the total size of a directory. Recursive:The “du” command can recursively scan through a directory and its...
On Linux and other Unix-like operating systems, an inode stores information that describes a file or directory except for its name and content or its actual data.
Using du to Check File Size With no command line parameters or options,dulists the total disk space the current directory and all subdirectories are using. Let's take a look at an example: du The size is reported in the default block size of 1,024 bytes per block. The entire subdirecto...
3.9G total du 命令使用通配符指定多个文件目录 du命令还允许您使用通配符模式,同时指定多个文件目录统计大小。这在统计指定文件类型,匹配文件目录名称时非常有用。 例如命令sudo du -csh ~/Do*打印家目录中以Do开头的所有目录的大小。通常是/home/myfreax/Documents与/home/linux/Downloads目录的大小。