Skip to content

Magenaut

  • Home
  • Topics
    • Notes
    • Tutorial
    • Bug fixing
    • Extension
    • Server
  • Q&A
  • Privacy Policy
  • About

disk-usage

Find biggest files or directories

August 9, 2022 by Magenaut

Which command will print the sizes of all files and directories in the tmp directory (including hidden ones) and sort them by sizes from
largest to smallest in human readable format (e.g. 2 GB)?

Categories Q&A, Unix & Linux Tags disk-usage, shell-script Leave a comment

Using –exclude with the du command

August 9, 2022 by Magenaut

This is probably something basic but I’m not able to make it work. I’m trying to use DU to get a total size of files minus certain directories. I need to exclude one specific directory called uploads but not every directory called uploads. For example, my file structure looks a bit like this:

Categories Q&A, Unix & Linux Tags command-line, disk-usage Leave a comment

Why is a text file taking up at least 4kB even when there’s just one byte of text in it?

August 9, 2022 by Magenaut

For some reason, when I make a text file on OS X, it’s always at least 4kB, unless it’s blank. Why is this? Could there be 4,000 bytes of metadata about 1 byte of plain text?

Categories Q&A, Unix & Linux Tags disk-usage, filesystems Leave a comment

df not recognizing partition being resized?

August 8, 2022 by Magenaut

I’ve got Ubuntu 18.04 Server in Virtual Box, and once I’ve ran out of 10 GB of allocated space on virtual disk, I’ve increased the size of the virtual disk to 17 GB and resized the root partition with parted‘s resizepart command (and done so while partition is in use, and yes I know it’s … Read more

Categories Q&A, Unix & Linux Tags disk-usage, parted, ubuntu, virtualbox Leave a comment

Tell fs to free space from deleted files NOW

August 8, 2022 by Magenaut

Is there a way to tell the kernel to give back the free disk space now? Like a write to something in /proc/ ? Using Ubuntu 11.10 with ext4.

Categories Q&A, Unix & Linux Tags df, disk-usage, ext3, ext4, proc Leave a comment

How to recursively find the amount stored in directory?

August 7, 2022 by Magenaut

I know you are able to see the byte size of a file when you do a long listing with ll or ls -l. But I want to know how much storage is in a directory including the files within that directory and the subdirectories within there, etc. I don’t want the number of files, but instead the amount of storage those files take up.

Categories Q&A, Unix & Linux Tags directory, disk-usage, recursive Leave a comment

Where are my inodes going?

August 7, 2022 by Magenaut

My root filesystem is running out of inodes. If this were an issue of disk space, I’d use du -s to get a top-level overview of where the space is going, then head down the directory tree to find particular offenders. Is there an equivalent option for inodes?

Categories Q&A, Unix & Linux Tags disk-usage, filesystems, inode Leave a comment

Getting size with du of files only

August 7, 2022 by Magenaut

How can I get the size of all files and all files in its subdirectories using the du command.

Categories Q&A, Unix & Linux Tags aix, disk-usage, files, find, ksh Leave a comment

Fedora 23 — Can I safely delete files in /var/cache/PackageKit/metadata/updates/packages?

August 7, 2022 by Magenaut

I noticed that the folder referenced in the subject line is taking up 1.5 GB. Can I run the below to clear it without causing permanent damage to my system?

Categories Q&A, Unix & Linux Tags disk-usage, fedora Leave a comment

Why are partition size and df output different?

August 7, 2022 by Magenaut

I have a partition /dev/sda1.
Disk utility shows it has the capacity of 154 GB.
df -h shows

Categories Q&A, Unix & Linux Tags disk-usage, partition Leave a comment
Older posts
Newer posts
← Previous Page1 Page2 Page3 Next →
  1. michealSmith07 on Is there a way to dynamically refresh the less command?August 21, 2022

    That is a very nice post. I like this post.

  2. anonymous on Fix libwacom9 dependency issue when upgrade DebianJune 27, 2022

    saved my day!! Thanks for the help…

  3. sreedhar on Fix libwacom9 dependency issue when upgrade DebianMay 10, 2022

    Thanks its working

  4. saintnick on Fix libwacom9 dependency issue when upgrade DebianMay 10, 2022

    remove libwacom2 worked for me as well

  5. ranafoul on Fix libwacom9 dependency issue when upgrade DebianApril 22, 2022

    apt remove libwacom2 helped on kali 2022.01. gr8

.net ajax asp.net asp.net-core asp.net-mvc asp.net-mvc-3 asp.net-mvc-4 asp.net-web-api bash c# command-line css custom-post-types custom-taxonomy dataframe dictionary django entity-framework functions gridview html iis javascript jquery json linux list matplotlib numpy pandas php plugin-development plugins posts python python-2.7 python-3.x security shell shell-script sql string vb.net webforms wp-query

© 2026 Magenaut • Built with GeneratePress