hidden thumbnails

Place to discuss anything, almost. No politics, religion, Microsoft, or anything else that I (the nazi censor) deem inappropriate.

hidden thumbnails

Postby caveman » Thu Jun 23, 2005 6:42 pm

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!
caveman
programmer
programmer
 
Posts: 130
Joined: Sun Feb 09, 2003 1:08 pm
Location: Midrand Gauteng, South Africa

Postby Void Main » Sun Jun 26, 2005 6:40 pm

To do a du on hidden files/directories:
$ du -sk .??*
User avatar
Void Main
Site Admin
Site Admin
 
Posts: 5705
Joined: Wed Jan 08, 2003 5:24 am
Location: Tuxville, USA

Postby caveman » Sun Jun 26, 2005 7:38 pm

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.
caveman
programmer
programmer
 
Posts: 130
Joined: Sun Feb 09, 2003 1:08 pm
Location: Midrand Gauteng, South Africa

Postby Void Main » Sun Jun 26, 2005 8:12 pm

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.
User avatar
Void Main
Site Admin
Site Admin
 
Posts: 5705
Joined: Wed Jan 08, 2003 5:24 am
Location: Tuxville, USA

Postby worker201 » Sun Jun 26, 2005 10:28 pm

Just like in DOS? A '?' matches one and only one character, and '*' matches one or more or none?
worker201
guru
guru
 
Posts: 668
Joined: Sun Jun 13, 2004 6:38 pm
Location: Hawaii

Postby Void Main » Sun Jun 26, 2005 10:39 pm

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.
User avatar
Void Main
Site Admin
Site Admin
 
Posts: 5705
Joined: Wed Jan 08, 2003 5:24 am
Location: Tuxville, USA


Return to The Lounge

Who is online

Users browsing this forum: No registered users and 1 guest

cron