You can edit it here and send me a pull request.
Have an update or suggestion for this article? This can be useful if you are dealing with out of disk space issues on a system. Run the following as root to see the ten largest files or folders on a system. This will change the behaviour of du to write size counts for files as well as folders. To find the largest folders on a file system pass the -a option.
How to find the largest files or folders on a file system To sort by file size pass the output of du to sort and use the -n (numeric) and -r (reverse) options.
du -s /home/georgeĪlong with the -h option a human readable format is possible. This will print a grand total size for the folder to standard output. To view the file size of a directory pass the -s option to the du command followed by the folder. du -h ~/goĨ.0K /home/george/go/src/gopkg.in/yaml.v2/.git/infoĤ8K /home/george/go/src/gopkg.in/yaml.v2/.git/hooksġ.2M /home/george/go/src/gopkg.in/yaml.v2/.git/objects/packġ.2M /home/george/go/src/gopkg.in/yaml.v2/.git/objects Instead of showing file size in kilobytes for all files and folders the output is modified to into a human readable format. To view disk usage in human readable format pass the -h option. How to view disk usage in human readable format
This will show the full output and append a total line. To view a grand total for a directory pass the -c option. How to view a grand total for a directory Folders are summaries so include a sum of files and folders within them. The output show the disk usage in kilobytes in the first column followed by the full path to the file or folder.
This will print a summary of the files and folders in a directory. To view a disk usage summary of a directory pass the directory to the du command. How to view a disk usage summary of a directory It supports showing just directories or all files, showing a grand total, outputting in human readable format and can be combined with other UNIX tools to output a sorted list of the largest files of folders on a system. It can be used to find out disk usage for files and folders and to show what is taking up space. The du command is a command line utility for reporting file system disk space usage.
Example 2: Get all DFS namespaces for a domain PS C:\> Get-DfsnRoot -Domain "" The command uses the Format-List cmdlet to format the output.įor more information about this cmdlet, type Get-Help Format-List. This command gets configuration settings for the namespace that has the Path \\Contoso\AccountingResources. Examples Example 1: Get DFS namespace configuration settings PS C:\> Get-DfsnRoot -Path "\\Contoso\AccountingResources" | Format-List You can make changes to DFS settings by using the Set-DfsnRoot cmdlet.įor more information about DFS namespaces, see Overview of DFS Namespaces on TechNet. Use this cmdlet without parameters to see information on all DFS namespaces. You can specify DFS namespaces by using a standalone or domain-based namespace path, by using a server, or by using a domain. The Get-DfsnRoot cmdlet gets configuration settings for Distributed File System (DFS) namespaces.