Hi all,
I need to know in vmfs how much space a directory uses before I use tar to send it to a tape..
One of my linux guru's wrote this little script, but surely there is a better /native way of doing this ? thanks for any pointers Wilf (Quick and dirty solution follows) #! /bin/bash cd $1 total=`du -caLlk . | grep total | cut -f1` count=`find . -type f | wc -l` echo "$total kb in $count files"
du -sh <directory name>
should do the trick.
If you found this helpful please consider the use of the Helpful /Correct buttons to award points. Thanks !!
du -sh <directory name>
should do the trick.
If you found this helpful please consider the use of the Helpful /Correct buttons to award points. Thanks !!
Hello, are you using ESX 3.x or 3i?
3.5 But I think that du should dohe trick, Ill pipe it to a file and test to see if itsmaller than 400Gb then stick it on tape.
Wilf
I've moved your post to the ESX Server 3.5 Configuration forum
Dave Mishchenko
VMware Communities User Moderator
Hi - not sure if I fully understood your question - to find the size of a particular single directory, including all subdirectories, the du -sh <directory name> will be fine, but might take a while depending on the number of files.
If you wanted to see total free/ used space on your vmfs volumes, then vdf -h would be quicker.
If you found this helpful please consider the use of the Helpful /Correct buttons to award points. Thanks !!