2
votes
2answers
115 views

find the single largest file

We host a share of size 4 TB. How efficient is it to find a file with highest size. Usually we use: du -ak | sort -k1 -bn | tail -1 and it is not easy to scan through a share of such huge size and ...
3
votes
1answer
87 views

Getting size of directories and exclude some folders

I have an directory structure like this: application1 application1_edit application2 application2_edit Is there any way to get the total size for every folder (including sub-directories) and ...
1
vote
1answer
49 views

How can I create a variable for just the Size, Used, and Available of df?

Say I want to create variables, one for each the size, used, and available when using df. How can I create variables for each? Is there an option that returns just one of these things? directorySize= ...
2
votes
3answers
127 views

How to extract the file size with du

I'm using du to get the file size of the result archive in a packager script: > du -smh archive.zip 51M archive.zip I'd like to assign just the 51M part to a variable, to be able to print: ...
2
votes
2answers
311 views

How come lvextend allocates less than the specified amount of space?

I am trying to extend a volume, let's call it /dev/vol1. I see the initial volume size is 500MB when I call: df --block-size=M /dev/vol1 then to extend it 100MB more I call: lvextend -L+100M ...
4
votes
2answers
4k views

How to list ALL directories according to their size? [without including the parent directory]

I have a bunch of random folders, some of them are hidden (beginning with a period). I want to list all of them, sorted by their sizes. I have something on the lines of this in mind: ls -d -1 -a */ ...
1
vote
1answer
337 views

error using “du” command

I am on the university machine trying to estimate the disk usage I have on my space I do du -csh ./ from the begining of my account, but an error is given that ./Yesterday/Yesterday is not a ...