Page 1 of 1

hidden thumbnails

PostPosted: Thu Jun 23, 2005 6:42 pm
by caveman
Hi.

Got a serious suprise on my system today.

Been fooling around with security cameras and "motion" for the
past 8 weeks or so. To check everything I list the motion default
directory as thumbnails every now and then to check what the cameras
are picking up etc. etc.

I notices I'm losing a lot of space and my home directory keeps on growing.
So today I decided to investigate. Lo and behold I find hundreds of
thousands of thumbnails in the .thumbnails directory and using 4.5GB of
space.

yoiks! what a bloody suprise! removing all them files sure took a long
time - until I did a "rm -rf" of the ".thumbnails/normal" directory and then
recreated it.

Just dropped this note - maybe it'll help someone else!
Reckon it sure is worth while to check these "hidden" directories
from time to time.

O yes - and "du -s *" doesn't show you the size of hidden directories...
and that is actually where the fun starts!

PostPosted: Sun Jun 26, 2005 6:40 pm
by Void Main
To do a du on hidden files/directories:
$ du -sk .??*

PostPosted: Sun Jun 26, 2005 7:38 pm
by caveman
Tx Void

Now that is a pattern I don't think I've ever seen or used before..
been scratching my brain en even reloaded some memory backups..
but cannot say I've used that before.

PostPosted: Sun Jun 26, 2005 8:12 pm
by Void Main
I have always used that when working with hidden files, especially when deleting them with the "rm" command (although rm now has safeguards against recurding down parent directories). The reason you don't want to just use ".*" is because that will match the special directory names "." and ".." and recurse down the parent directory (..). If you use ".??*" that will only match files starting with a "." but have to have at least 3 characters.

PostPosted: Sun Jun 26, 2005 10:28 pm
by worker201
Just like in DOS? A '?' matches one and only one character, and '*' matches one or more or none?

PostPosted: Sun Jun 26, 2005 10:39 pm
by Void Main
worker201 wrote:Just like in DOS? A '?' matches one and only one character, and '*' matches one or more or none?


Well actually you have it phrased backwards. You meant to say "DOS is just like *NIX" in that respect. :) That's about where the similarities end though. Try using regular expressions in DOS. Ooops, DOS is brain dead.