I tried to obtain the size of a directory (containing directories and sub directories) by using the ls command with option l. It seems to work for files (ls -l file name), but if I try to get the size of a directory (for instance, ls -l /home), I…
When administering Linux systems I often find myself struggling to track down the culprit after a partition goes full. I normally use du / | sort -nr but on a large filesystem this takes a long time before any results are returned.
Also, this is…
How do you sort du -sh /dir/* by size? I read one site that said use | sort -n but that's obviously not right. Here's an example that is wrong.
[~]# du -sh /var/* | sort -n
0 /var/mail
1.2M /var/www
1.8M /var/tmp
1.9G /var/named
2.9M …
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…
I have a linux server, which currently has below space usage:
/dev/sda3 20G 15G 4.2G 78% /
/dev/sda6 68G 42G 23G 65% /u01
/dev/sda2 30G 7.4G 21G 27% /opt
/dev/sda1 99M 19M 76M 20%…
How does one find large files that have been deleted but are still open in an application? How can one remove such a file, even though a process has it open?
The situation is that we are running a process that is filling up a log file at a terrific…
When I sum up the sizes of my files, I get one figure. If I run du, I get another figure. If I run du on all the files on my partition, it doesn't match what df claims is used. Why are there so many different figures for the total size of my files?…
Disk space on my root partition is running low, so I want to delete some applications from the system. How can I see which software packages use the most disk space? Is it possible to view that from aptitude?
I know about generic disk space…
I understand that by default, newly created filesystems will be created with 5% of the space allocated for root. I also know you can change the defined space with:
tune2fs -m 1 /dev/sdXY
What I'm curious about though, is what the actual purpose for…
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…
I'm looking for a linux alternative to WinDirStat. I would like to know what is taking up space on my hard drives.
A program that works on console and doesn't require a UI is preferred .
I like tree it's a nice way to display my files and the size of folders/directories. But the -h option only shows the size of the directory, not the cumulative size of its contents.
/media/
├── [ 16K] 64D9-E862
│ ├── [8.0K] downloads
I know for…
I want to see how many files are in subdirectories to find out where all the inode usage is on the system. Kind of like I would do this for space usage
du -sh /*
which will give me the space used in the directories off of root, but in this case I…
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.
This is probably an old and very repeated theme.
After hitting 0 space only noticed when my editor couldn't…
How can I get the size of all files and all files in its subdirectories using the du command.
I am trying the following command to get the size of all files (and files in subdirectories)
find . -type f | du -a
But this prints out the folder sizes as…