05-09-2012, 04:08 PM | #1 |
Junior Member
Posts: 3
Karma: 10
Join Date: May 2012
Device: Kindle
|
Removing files of zero size in Calibre
Hi everyone,
I've just found this site, hopefully it can help with the problem I'm having. I was messing around with my calibre and managed to import a number of .mobi files that are zero bytes in size. They now appear in my calibre database. Does anyone have a good way of removing them from the command line. I've tried calibredb list -s size:=0 --with-library /data2/media/calibre/ | calibredb remove The first command lists the zero size books correctly but the second part gives out saying that I need to specify the books to be removed. Has anyone come across this before. BTW I'm using version (calibre 0.8.35) Thanks. Last edited by zynster; 05-09-2012 at 04:13 PM. |
05-18-2012, 10:27 AM | #2 |
Junior Member
Posts: 3
Karma: 10
Join Date: May 2012
Device: Kindle
|
Well thanks for all the viewings....
I've decided to simply delete the dB, remove the files on the OS and the recreate the calibre dB. |
Advert | |
|
05-18-2012, 11:03 AM | #3 |
Grand Sorcerer
Posts: 12,103
Karma: 73447988
Join Date: Nov 2007
Location: Toronto
Device: Nexus 7, Clara, Touch, Tolino EPOS
|
Zynster; when I read the help for calibredb remove it tells me it expects another argument; a comma separated list of IDs of books to remove; NOT a list on stdin of books to process, so I would not have expected that to work at all.
You could also just have dropped the zero byte files at the OS level and then performed a library check function to identify the missing material in calibre and then had calibre peform a cleanup. Also, in the calibre gui, did you try a search for size:=0 format:mobi then select all the displayed records, right click them and do either a remove books | remove selected books OR a remove books | remove remove files of a specified format and select mobi? |
05-19-2012, 08:43 PM | #4 |
Junior Member
Posts: 1
Karma: 10
Join Date: May 2012
Device: kindle fire
|
xargs
I use the windows version of calibre, but to pass parameters via pipe in unix, I would use xargs:
calibredb list -s size:=0 --with-library /data2/media/calibre/ | xargs calibredb remove |
05-21-2012, 07:40 AM | #5 |
Junior Member
Posts: 3
Karma: 10
Join Date: May 2012
Device: Kindle
|
Thanks for the responses. I'm running it without a GUI and I was stuck for a while.
I did read the documentation about removing the books but it didn't click that I could just remove the files and do a cleanup of the library. Well you live and learn. Thanks again. |
Advert | |
|
Thread Tools | Search this Thread |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Removing files with no formats | renzii | Library Management | 4 | 04-19-2012 07:05 PM |
Removing files, cleaning up references | Artha | Sigil | 11 | 07-19-2011 11:05 AM |
Removing page numbers and spaces from Mobi files | rabbischle | Conversion | 4 | 06-10-2011 03:03 AM |
removing files from reader/problems syncing | annac | Sony Reader | 5 | 11-15-2009 07:46 AM |
Removing Deleted Files / Refresh the Library | pragmortal | Calibre | 4 | 09-23-2009 04:51 AM |