Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 07-28-2010, 06:30 PM   #1
Takeshi_12
Junior Member
Takeshi_12 began at the beginning.
 
Posts: 3
Karma: 10
Join Date: May 2010
Device: none
Deleting temp calibre files sometimes takes forever

Hi,

I'm using the command line tool on Linux to convert a lot of ebooks. Every day I have some temporary dirs left over in my /tmp/ directory called something like calibre_0.7.10_xaAwDN_plumber. I delete the files with a cron but sometimes a directory has zillions of files in it and it takes over an hour to delete one plumber directory on my ext3 filesystem.

Is there any possibility to avoid writing so many files in one directory? Is there a possibility to add subdirs in the plumber directories like a/f/e/image.png which is way faster to delete?

I was thinking about defining an extra calibre temp partition and format it every other day. Ok, that's not good style but I don't know how to clean up my tmp directory if deletions of calibre temp files takes several hours a day.

Any suggestions? ;-)

Cheers,
Takeshi
Takeshi_12 is offline   Reply With Quote
Old 07-28-2010, 06:37 PM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,771
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
If you're getting temp files left over, your calibre command is crashing, you should investigate and fix that rather than messing around with gaziliions of temp files.

Or if you dont want to do that, then simply set the TEMP environment variable and cleanup after the command exits each time.
kovidgoyal is offline   Reply With Quote
Old 07-28-2010, 07:21 PM   #3
banjomike
Addict
banjomike ought to be getting tired of karma fortunes by now.banjomike ought to be getting tired of karma fortunes by now.banjomike ought to be getting tired of karma fortunes by now.banjomike ought to be getting tired of karma fortunes by now.banjomike ought to be getting tired of karma fortunes by now.banjomike ought to be getting tired of karma fortunes by now.banjomike ought to be getting tired of karma fortunes by now.banjomike ought to be getting tired of karma fortunes by now.banjomike ought to be getting tired of karma fortunes by now.banjomike ought to be getting tired of karma fortunes by now.banjomike ought to be getting tired of karma fortunes by now.
 
banjomike's Avatar
 
Posts: 319
Karma: 397404
Join Date: Aug 2009
Location: UK
Device: PRS-505,DSlibris,nook Glow & Simple & HD+,Tab S2,Moon+,Kobo Clara
Quote:
Originally Posted by kovidgoyal View Post
If you're getting temp files left over, your calibre command is crashing, you should investigate and fix that rather than messing around with gaziliions of temp files.

Or if you dont want to do that, then simply set the TEMP environment variable and cleanup after the command exits each time.
I only use the GUI version and also get temp files left in my TEMP folder after every Calibre session or after using the viewer. Typically 2 for each run of the viewer and 40 or so after a short session of adding/converting books. They add-up. The first time I noticed there were over 500 files and folders.

The worst case was a PDF to EPUB conversion which left 34000 image files.

Is there a way to specify a working folder for Calibre rather than just use the TEMP (or TMP) variable which is where every other program dumps files?

Using XP/SP3, Calibre 7.10
banjomike is offline   Reply With Quote
Old 07-28-2010, 08:37 PM   #4
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,771
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Set the TEMP environment variable
kovidgoyal is offline   Reply With Quote
Old 07-29-2010, 04:49 AM   #5
banjomike
Addict
banjomike ought to be getting tired of karma fortunes by now.banjomike ought to be getting tired of karma fortunes by now.banjomike ought to be getting tired of karma fortunes by now.banjomike ought to be getting tired of karma fortunes by now.banjomike ought to be getting tired of karma fortunes by now.banjomike ought to be getting tired of karma fortunes by now.banjomike ought to be getting tired of karma fortunes by now.banjomike ought to be getting tired of karma fortunes by now.banjomike ought to be getting tired of karma fortunes by now.banjomike ought to be getting tired of karma fortunes by now.banjomike ought to be getting tired of karma fortunes by now.
 
banjomike's Avatar
 
Posts: 319
Karma: 397404
Join Date: Aug 2009
Location: UK
Device: PRS-505,DSlibris,nook Glow & Simple & HD+,Tab S2,Moon+,Kobo Clara
Quote:
Originally Posted by kovidgoyal View Post
Set the TEMP environment variable
TEMP and TMP are already set to e:\temp which just means that Calibre files get mixed in with files from all the other applications that use the environment variables to define their working directory.
banjomike is offline   Reply With Quote
Old 07-29-2010, 11:29 AM   #6
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,771
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Launch calibre from a bat file which sets the variables to a specific location.
kovidgoyal is offline   Reply With Quote
Old 07-29-2010, 05:13 PM   #7
banjomike
Addict
banjomike ought to be getting tired of karma fortunes by now.banjomike ought to be getting tired of karma fortunes by now.banjomike ought to be getting tired of karma fortunes by now.banjomike ought to be getting tired of karma fortunes by now.banjomike ought to be getting tired of karma fortunes by now.banjomike ought to be getting tired of karma fortunes by now.banjomike ought to be getting tired of karma fortunes by now.banjomike ought to be getting tired of karma fortunes by now.banjomike ought to be getting tired of karma fortunes by now.banjomike ought to be getting tired of karma fortunes by now.banjomike ought to be getting tired of karma fortunes by now.
 
banjomike's Avatar
 
Posts: 319
Karma: 397404
Join Date: Aug 2009
Location: UK
Device: PRS-505,DSlibris,nook Glow & Simple & HD+,Tab S2,Moon+,Kobo Clara
That looks to have worked. After closing Calibre only 4 files and the fontconfig tree were left this time but removing the occasional 34000'er should be MUCH easier. Thanks.

Incidently, you didn't specifically say but I am sure you already know that Calibre uses both TEMP and TMP variables.

Anyway, thanks.
banjomike is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Temp files Jeff L Calibre 3 10-14-2010 05:58 PM
LIT-to->EPUB conversion leaving behind temp files? Stinger Calibre 1 06-20-2010 09:31 PM
Calibre deleting files? al35 Calibre 7 03-22-2010 12:43 PM
Getting list of books on device takes forever grib Calibre 4 10-29-2009 06:59 AM
Calibre files left in Temp folder itimpi Calibre 8 05-06-2009 06:15 AM


All times are GMT -4. The time now is 05:47 AM.


MobileRead.com is a privately owned, operated and funded community.