I'm In Need of a Null Directory

Here is where users who have been using MEPIS awhile and know the basics of linux and MEPIS can ask questions.
Message
Author
User avatar
joany
Forum Veteran
Forum Veteran
Posts: 6123
Joined: Mon Feb 12, 2007 1:45 pm

I'm In Need of a Null Directory

#1 Postby joany » Thu Apr 05, 2012 7:50 pm

I would like to create a null directory similar to /dev/null that I could symlink to the ~/.thumbnails/large and ~/.thumbnails/normal directories. Over the course of a day, Dolphin fills both of these directories with garbage. I tried changing permissions to make them read-only, but then my ~/.xsession-errors file fills up as Dolphin repeatedly tries to write to read-only directories.

My aim is to let Dolphin write to ~/.thumbnails directories, but make both of them black holes. Does anyone have a suggestion on how to do this?
MX-14; 3.12-0.bpo.1-686-pae kernel using 4GB RAM
2.4GHz AMD Athlon 4600+
NVidia GeForce 6150 LE; 304.121 Display Driver
You didn't slow down because you're old; you're old because you slowed down.

User avatar
GoManutd
Forum Guide
Forum Guide
Posts: 2952
Joined: Mon Jun 30, 2008 8:06 pm

Re: I'm In Need of a Null Directory

#2 Postby GoManutd » Thu Apr 05, 2012 9:03 pm

symlink the large and normal directories to /dev/null might work...

EDIT: if you have THAT MANY files being added to these directories, setting these to some black hole like /dev/null or something similar may result in a performance hit.

using a tool like bleachbit, like rich suggested, may well be the better option
Last edited by GoManutd on Thu Apr 05, 2012 9:29 pm, edited 1 time in total.

User avatar
richb
Administrator
Posts: 13124
Joined: Wed Jul 12, 2006 2:17 pm

Re: I'm In Need of a Null Directory

#3 Postby richb » Thu Apr 05, 2012 9:11 pm

Off topic, but I use bleachbit to delete the .thumbnail directories on a regular basis, along with other crud that builds up.
Forum Rules
Guide - How to Ask for Help

Rich

Laptop: Acer V5-572G: Intel i5, 12 GIG mem, Intel graphics, SanDisk SSD, 256GB
Virtualbox: Win 7
Desktop: MX-15- 64, AMD A8 7600 FM2+ CPU R7 Graphics, fglrx driver, 16 GIG Mem. Samsung EVO SSD 250 GB

User avatar
matelot
Forum Regular
Forum Regular
Posts: 298
Joined: Sat Jul 15, 2006 4:47 am

Re: I'm In Need of a Null Directory

#4 Postby matelot » Fri Apr 06, 2012 6:39 am

I just used Bleachbit, only to find that most web sites (using Seamonkey) then visited failed to load graphics. Logging off and on again immediately solved that.
Asus K55A i7 laptop 6GB RAM, 500GB SATA HDD, turbo-boost 3.1Ghz::
Win7 64 bit - eek!::
Intel graphics, UEFI and GPT::
HP Deskjet 3050 wireless::
Image

User avatar
richb
Administrator
Posts: 13124
Joined: Wed Jul 12, 2006 2:17 pm

Re: I'm In Need of a Null Directory

#5 Postby richb » Fri Apr 06, 2012 6:41 am

matelot wrote:I just used Bleachbit, only to find that most web sites (using Seamonkey) then visited failed to load graphics. Logging off and on again immediately solved that.

Bleachbit is highly configurable. Apparently an option was enabled that caused your issue. Not sure which, one, maybe browser cache.
Forum Rules
Guide - How to Ask for Help

Rich

Laptop: Acer V5-572G: Intel i5, 12 GIG mem, Intel graphics, SanDisk SSD, 256GB
Virtualbox: Win 7
Desktop: MX-15- 64, AMD A8 7600 FM2+ CPU R7 Graphics, fglrx driver, 16 GIG Mem. Samsung EVO SSD 250 GB

User avatar
joany
Forum Veteran
Forum Veteran
Posts: 6123
Joined: Mon Feb 12, 2007 1:45 pm

Re: I'm In Need of a Null Directory

#6 Postby joany » Fri Apr 06, 2012 7:36 am

GoManutd wrote:symlink the large and normal directories to /dev/null might work...

EDIT: if you have THAT MANY files being added to these directories, setting these to some black hole like /dev/null or something similar may result in a performance hit.

using a tool like bleachbit, like rich suggested, may well be the better option

I set up symlinks to /dev/null and that seems to work, although I'm a little leery about changing the attributes from directories to files. I'll keep a close eye on ~/.xsession-errors to see if errors pile up as a result.

EDIT:

Duplicate copies of the same .png files pile up in the ~/.thumbnails directories, causing them to bloat beyond reason. This seems totally pointless, and performance doesn't suffer by defeating this. I believe ~/.thumbnails is a carry-over from the time when computers were slow and RAM was limited. With today's fast, modern computers with huge RAM capacities, it just isn't necessary to cache image files this way.

I used bleachbit once, and my desktop immediately became unstable. Restoring partition images of /home and / fixed the problem, but I don't want to repeat that experience.
Last edited by joany on Fri Apr 06, 2012 8:41 am, edited 1 time in total.
MX-14; 3.12-0.bpo.1-686-pae kernel using 4GB RAM
2.4GHz AMD Athlon 4600+
NVidia GeForce 6150 LE; 304.121 Display Driver
You didn't slow down because you're old; you're old because you slowed down.

User avatar
richb
Administrator
Posts: 13124
Joined: Wed Jul 12, 2006 2:17 pm

Re: I'm In Need of a Null Directory

#7 Postby richb » Fri Apr 06, 2012 7:58 am

joany wrote:
GoManutd wrote:symlink the large and normal directories to /dev/null might work...

EDIT: if you have THAT MANY files being added to these directories, setting these to some black hole like /dev/null or something similar may result in a performance hit.

using a tool like bleachbit, like rich suggested, may well be the better option

I set up symlinks to /dev/null and that seems to work, although I'm a little leery about changing the attributes from directories to files. I'll keep a close eye on ~/.xsession-errors to see if errors pile up as a result.

I used bleachbit once, and my desktop immediately became unstable. Restoring partition images of /home and / fixed the problem, but I don't want to repeat that experience.

Never had an issue with bleachbit running as user or root.
Forum Rules
Guide - How to Ask for Help

Rich

Laptop: Acer V5-572G: Intel i5, 12 GIG mem, Intel graphics, SanDisk SSD, 256GB
Virtualbox: Win 7
Desktop: MX-15- 64, AMD A8 7600 FM2+ CPU R7 Graphics, fglrx driver, 16 GIG Mem. Samsung EVO SSD 250 GB

User avatar
joany
Forum Veteran
Forum Veteran
Posts: 6123
Joined: Mon Feb 12, 2007 1:45 pm

Re: I'm In Need of a Null Directory

#8 Postby joany » Fri Apr 06, 2012 8:46 am

richb wrote:Never had an issue with bleachbit running as user or root.

Users' experiences are somewhat mixed, as doing a search on "bleachbit" in these forums shows.
MX-14; 3.12-0.bpo.1-686-pae kernel using 4GB RAM
2.4GHz AMD Athlon 4600+
NVidia GeForce 6150 LE; 304.121 Display Driver
You didn't slow down because you're old; you're old because you slowed down.

User avatar
richb
Administrator
Posts: 13124
Joined: Wed Jul 12, 2006 2:17 pm

Re: I'm In Need of a Null Directory

#9 Postby richb » Fri Apr 06, 2012 8:52 am

joany wrote:
richb wrote:Never had an issue with bleachbit running as user or root.

Users' experiences are somewhat mixed, as doing a search on "bleachbit" in these forums shows.

I suspect it is what options one chooses to enable. Some are quite draconian in "cleaning". And I would agree if you enable an option that may cause serious issues the application is not that safely used.

Keep us posted on the result of your /dev/null solution. I dislike the buildup of those thumbnail files as well and a different solution would be welcome.
Forum Rules
Guide - How to Ask for Help

Rich

Laptop: Acer V5-572G: Intel i5, 12 GIG mem, Intel graphics, SanDisk SSD, 256GB
Virtualbox: Win 7
Desktop: MX-15- 64, AMD A8 7600 FM2+ CPU R7 Graphics, fglrx driver, 16 GIG Mem. Samsung EVO SSD 250 GB

User avatar
kmathern
Forum Veteran
Forum Veteran
Posts: 9178
Age: 58
Joined: Wed Jul 12, 2006 2:26 pm

Re: I'm In Need of a Null Directory

#10 Postby kmathern » Fri Apr 06, 2012 9:24 am

You might create a simple script to remove files in the ~/.thumbnails/large & ~/.thumbnails/normal directories (like the one below) and have it run as a cron job at whatever interval you want (daily, hourly, every 15 minutes, etc).

Code: Select all

#!/bin/bash

rm  ~/.thumbnails/large/*
rm  ~/.thumbnails/normal/*


I don't have that much experience in setting up cron jobs but it doesn't look too difficult. I found one guide here: http://www.cyberciti.biz/faq/how-do-i-a ... unix-oses/. Btw, is there a KDE4 program for creating/managing cron jobs?


Return to “Regulars”

Who is online

Users browsing this forum: Bing [Bot] and 2 guests