Skip to main content
Fix ambiguity in title (sounded more like destroying the disk drive!) and improve formatting of body
Source Link
Toby Speight
  • 81.7k
  • 14
  • 101
  • 308

Making disks break downa disk usage breakdown

I'm looking for a better way of doing this code I made. I work for tech support and one of the biggest questions I am asked is: "Hey, how did my disk get so full in my VPS"VPS?"

I am aiming for somethingoutput like:

home/ is taking up xGB
home/user1 xgb
home/user2 xgb
home/ is taking up xGB
home/user1 xgb
home/user2 xgb

and so on. So far I have this, which does alright, but I am looking for a prettier way of getting this done.

#!/bin/bash
for i in $(ls -d */ |  grep -v proc);
 do
printf "**** $i has the following breakdown ********\n"

du -h --max-depth=1 $i
done

Making disks break down

I'm looking for a better way of doing this code I made. I work for tech support and one of the biggest questions I am asked is: "Hey how did my disk get so full in my VPS"

I am aiming for something like:

home/ is taking up xGB
home/user1 xgb
home/user2 xgb

and so on. So far I have this, which does alright, but I am looking for a prettier way of getting this done.

#!/bin/bash
for i in $(ls -d */ |  grep -v proc);
 do
printf "**** $i has the following breakdown ********\n"

du -h --max-depth=1 $i
done

Making a disk usage breakdown

I'm looking for a better way of doing this code I made. I work for tech support and one of the biggest questions I am asked is: "Hey, how did my disk get so full in my VPS?"

I am aiming for output like:

home/ is taking up xGB
home/user1 xgb
home/user2 xgb

and so on. So far I have this, which does alright, but I am looking for a prettier way of getting this done.

#!/bin/bash
for i in $(ls -d */ |  grep -v proc);
 do
printf "**** $i has the following breakdown ********\n"

du -h --max-depth=1 $i
done
added 19 characters in body; edited title
Source Link
Jamal
  • 34.9k
  • 13
  • 133
  • 237

Making diskdisks break down prettier

LookingI'm looking for a better way of doing this code I made,. I work for tech support and one of the biggest questions I am asked is: "Hey how did my disk get so full in my VPS" 

I am aiming for something like home/ is taking up xGB home/user1 xgb home/user2 xgb:

home/ is taking up xGB
home/user1 xgb
home/user2 xgb

and so on. soSo far I have this, which does alright, but I am looking for a prettier way of getting this done.

#!/bin/bash
for i in $(ls -d */ |  grep -v proc);
 do
printf "**** $i has the following breakdown ********\n"

du -h --max-depth=1 $i
done

It does alright, but, I am looking for a pretier way of getting this done. and so on..

Making disk break down prettier

Looking for a better way of doing this code I made, I work for tech support and one of the biggest questions I am asked "Hey how did my disk get so full in my VPS" I am aiming for something like home/ is taking up xGB home/user1 xgb home/user2 xgb

and so on. so far I have

#!/bin/bash
for i in $(ls -d */ |  grep -v proc);
 do
printf "**** $i has the following breakdown ********\n"

du -h --max-depth=1 $i
done

It does alright, but, I am looking for a pretier way of getting this done. and so on..

Making disks break down

I'm looking for a better way of doing this code I made. I work for tech support and one of the biggest questions I am asked is: "Hey how did my disk get so full in my VPS" 

I am aiming for something like:

home/ is taking up xGB
home/user1 xgb
home/user2 xgb

and so on. So far I have this, which does alright, but I am looking for a prettier way of getting this done.

#!/bin/bash
for i in $(ls -d */ |  grep -v proc);
 do
printf "**** $i has the following breakdown ********\n"

du -h --max-depth=1 $i
done
Source Link

Making disk break down prettier

Looking for a better way of doing this code I made, I work for tech support and one of the biggest questions I am asked "Hey how did my disk get so full in my VPS" I am aiming for something like home/ is taking up xGB home/user1 xgb home/user2 xgb

and so on. so far I have

#!/bin/bash
for i in $(ls -d */ |  grep -v proc);
 do
printf "**** $i has the following breakdown ********\n"

du -h --max-depth=1 $i
done

It does alright, but, I am looking for a pretier way of getting this done. and so on..