If you don’t already have it, download the source tarball and build it yourself. KDirStat is a directory statistics utility for KDE, though it will run outside of KDE as long as you have the right libraries installed. That’s where GUI usage analysis tools shine. ![]() Scrolling through a long list of directories can be tedious. ĭepending on how your system is set up, command-line utilities might not work well for you. Here we’ll check the disk usage of the current directory, and display all file names with their disk usage, and then sort them numerically using the sort utility: $ du -ah | sort -n4.2M. If there’s a particular type of file that you would like to be excluded while calculating a directory’s usage, specify it with the –exclude= type option. Running du -ch | grep total prints just one line with the total size of the directory. The -s option will display a summary, without showing all of the subdirectories. The -a option also displays the file names along with directories and can be of use when you want to see a list of files in a particular directory. The -c option prints the grand total size of the directory at the end. For instance, du -h /home/bodhi/podcasts will print the size of the podcasts directory in a more readable format than the kilobytes used by default. If you want the size of an particular directory, specify it with du directoryname. A simple du will print usage for the present working directory and its subdirectories, along with the size of each directory. You can use the du command to determine which files or directories need to be deleted - or at least trimmed. Use the -h option to get more understandable output: $ df -h -T Filesystem Type Size Used Avail Use% Mounted on /dev/hda6 ext3 20G 9.3G 9.1G 51% / /dev/hda7 reiserfs 13G 2.1G 11G 17% /mnt/suse /dev/sda1 vfat 241M 152M 90M 63% /media/usbdisk By default, df measures the size in 1K blocks, which could be a little difficult for a desktop user to decipher. The -T option prints the filesystem type as well. ![]() The df utility displays the disk space usage on all mounted filesystems. Among all that clutter, you’ve got some simple tools to bring order to chaos. Finding the right file or folder to get rid of can be a chore if you have a huge disk. But when your usage gets flagged as high, it’s deciding what goes and what stays that takes time. Some distributions set up cron jobs that warn you when disk usage exceeds a certain percentage.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |