Link to home
Start Free TrialLog in
Avatar of LL0rd
LL0rdFlag for Germany

asked on

Calculating the used disk space with "find"

Hi,

on a linux machine I host an online shop. I have no idea why, but the shop software creates for every article a file "nopic_someid.jpg", each one with a different file size (don't ask me why ;) ). Now I want to calculate the wasted storage on the machine. Well, I can get all files with a normal linux "find" command, but how can I calculate the space taken by that files?
Avatar of Abhishek_Chib
Abhishek_Chib
Flag of India image

Him

Best way, log on via root, use following command :

find -name '*' -size +1000k | grep jpg

This will output of files name and location  which is size larger than 1000K.

Note : find command will take some time to give you output
Avatar of dzhungar
dzhungar

There is a du (Disk usage) command in every Unix and its clones
Or you can use also a UNIX command df with an option -h to show human in readable format, i.e "df -h" will show you used and available space on all mounts
ASKER CERTIFIED SOLUTION
Avatar of Alberto Cortes
Alberto Cortes
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial