Little working with chee

Table of Contents

This post is about chee, a small command line photo manager that I've been working on. After a first introduction this shows how I often use chee. Again, I use photos from this repository in the examples.

Adding new files

I use a sdcard reader to get the photos off my cameras. I also have some standard folders where I dump the sdcards into. For example, there is photos/NikonJ3/card01 where I put all files from the sdcard. If the numbering scheme on the camera restarts, I create a new folder like photos/NikonJ3/card02.

For this, the import command can be used. Assume the sdcard is mounted at ../sdcard having the following content:

tree sdcard
sdcard
├── DCN100
│   ├── Canon IXUS 300.jpg
│   ├── Canon IXUS 400.jpg
│   ├── Canon IXUS 430.jpg
│   ├── Canon IXUS 750.jpg
│   ├── Canon IXUS.jpg
│   ├── Canon IXUS v2.jpg
│   └── Canon IXUS v3.jpg
├── DCN101
│   ├── Canon EOS 70D.cr2
│   ├── Canon EOS 70D.jpg
│   ├── Leica T (Typ 701).jpg
│   ├── Minolta DiMAGE 5.jpg
│   ├── Minolta DiMAGE 7Hi.jpg
│   ├── Minolta DiMAGE 7.jpg
│   ├── Minolta DiMAGE A1.jpg
│   ├── Minolta DiMAGE EX.jpg
│   ├── Minolta DiMAGE S304.jpg
│   ├── Minolta DiMAGE S404.jpg
│   ├── Minolta DiMAGE X.jpg
│   └── Nokia Lumia 1520.jpg
└── DCN102
    ├── Nikon D100.jpg
    ├── Nikon D1X.jpg
    ├── Nikon D300.jpg
    ├── Nikon D3100.jpg
    ├── Nikon D3300.jpg
    ├── Nikon D40.jpg
    ├── Nikon D5000.jpg
    ├── Nikon D610.jpg
    ├── Nikon D7000.jpg
    ├── Nikon D70.jpg
    ├── Nikon D750.jpg
    ├── Nikon D810.jpg
    ├── Nikon D90.jpg
    ├── Nikon E5000.jpg
    ├── Nikon E5700.jpg
    ├── Nikon E775.jpg
    ├── Nikon E885.jpg
    ├── Nikon E900 (1).jpg
    ├── Nikon E900 (2).jpg
    ├── Nikon E950.jpg
    └── Nikon E990.jpg

3 directories, 40 files

And suppose my photos are in photos and I want this sdcard to be at photos/shooting. The import command copies all files from some source directories into a target directory (-r means recursive):

chee import -r ../sdcard/ shooting
Import /home/eike/org/journal/sdcard/DCN101/Nokia Lumia 1520.jpg … Added
Import /home/eike/org/journal/sdcard/DCN101/Minolta DiMAGE EX.jpg … Added
Import /home/eike/org/journal/sdcard/DCN101/Canon EOS 70D.jpg … Added
Import /home/eike/org/journal/sdcard/DCN101/Minolta DiMAGE S304.jpg … Added
Import /home/eike/org/journal/sdcard/DCN101/Canon EOS 70D.cr2 … Added
Import /home/eike/org/journal/sdcard/DCN101/Minolta DiMAGE A1.jpg … Added
Import /home/eike/org/journal/sdcard/DCN101/Minolta DiMAGE S404.jpg … Added
Import /home/eike/org/journal/sdcard/DCN101/Leica T (Typ 701).jpg … Added
Import /home/eike/org/journal/sdcard/DCN101/Minolta DiMAGE X.jpg … Added
Import /home/eike/org/journal/sdcard/DCN101/Minolta DiMAGE 5.jpg … Added
Import /home/eike/org/journal/sdcard/DCN101/Minolta DiMAGE 7.jpg … Added
Import /home/eike/org/journal/sdcard/DCN101/Minolta DiMAGE 7Hi.jpg … Added
Import /home/eike/org/journal/sdcard/DCN100/Canon IXUS 750.jpg … Added
Import /home/eike/org/journal/sdcard/DCN100/Canon IXUS.jpg … Added
Import /home/eike/org/journal/sdcard/DCN100/Canon IXUS v2.jpg … Added
Import /home/eike/org/journal/sdcard/DCN100/Canon IXUS 430.jpg … Added
Import /home/eike/org/journal/sdcard/DCN100/Canon IXUS 300.jpg … Added
Import /home/eike/org/journal/sdcard/DCN100/Canon IXUS v3.jpg … Added
Import /home/eike/org/journal/sdcard/DCN100/Canon IXUS 400.jpg … Added
Import /home/eike/org/journal/sdcard/DCN102/Nikon D3100.jpg … Added
Import /home/eike/org/journal/sdcard/DCN102/Nikon D40.jpg … Added
Import /home/eike/org/journal/sdcard/DCN102/Nikon D810.jpg … Added
Import /home/eike/org/journal/sdcard/DCN102/Nikon E900 (2).jpg … Added
Import /home/eike/org/journal/sdcard/DCN102/Nikon D750.jpg … Added
Import /home/eike/org/journal/sdcard/DCN102/Nikon D3300.jpg … Added
Import /home/eike/org/journal/sdcard/DCN102/Nikon D100.jpg … Added
Import /home/eike/org/journal/sdcard/DCN102/Nikon D90.jpg … Added
Import /home/eike/org/journal/sdcard/DCN102/Nikon E950.jpg … Added
Import /home/eike/org/journal/sdcard/DCN102/Nikon D5000.jpg … Added
Import /home/eike/org/journal/sdcard/DCN102/Nikon D70.jpg … Added
Import /home/eike/org/journal/sdcard/DCN102/Nikon E990.jpg … Added
Import /home/eike/org/journal/sdcard/DCN102/Nikon E775.jpg … Added
Import /home/eike/org/journal/sdcard/DCN102/Nikon E5000.jpg … Added
Import /home/eike/org/journal/sdcard/DCN102/Nikon E885.jpg … Added
Import /home/eike/org/journal/sdcard/DCN102/Nikon E900 (1).jpg … Added
Import /home/eike/org/journal/sdcard/DCN102/Nikon E5700.jpg … Added
Import /home/eike/org/journal/sdcard/DCN102/Nikon D300.jpg … Added
Import /home/eike/org/journal/sdcard/DCN102/Nikon D1X.jpg … Added
Import /home/eike/org/journal/sdcard/DCN102/Nikon D610.jpg … Added
Import /home/eike/org/journal/sdcard/DCN102/Nikon D7000.jpg … Added
Added: 40 files; in 0:00:16.514

Now the photos dir looks like this:

tree photos
photos
└── shooting
    ├── DCN100
    │   ├── Canon IXUS 300.jpg
    │   ├── Canon IXUS 400.jpg
    ...
    ├── DCN101
    │   ├── Canon EOS 70D.cr2
    │   ├── Canon EOS 70D.jpg
    ...
    └── DCN102
        ├── Nikon D100.jpg
        ├── Nikon D1X.jpg
        ...
        └── Nikon E990.jpg

4 directories, 40 files

I truncated the output for better reading. All image files from ../sdcard have been copied to shooting/ while the folder structure below sdcard has been preserved in the target directory. This way I dump my sdcards from various cameras to my hard drive.

Searching images

After the import, you can use chee find to search for photos. Here are some non-sense examples:

Find photos with more than 12 mega pixel:

chee find 'pixel>12m'
2010-11-28 17:32  4928x3264 16.1mp  (NIKON D7000)        7.8mb /home/ei…urnal/photos/shooting Nikon D7000.jpg
2010-12-02 13:18  4608x3072 14.2mp  (NIKON D3100)        3.3mb /home/ei…urnal/photos/shooting Nikon D3100.jpg
2011-04-25 01:55  4288x2848 12.2mp  (NIKON D90)            3mb /home/ei…urnal/photos/shooting Nikon D90.jpg
2011-04-25 03:53  4288x2848 12.2mp  (NIKON D300)         6.4mb /home/ei…urnal/photos/shooting Nikon D300.jpg
2013-11-23 16:47  6016x4016 24.2mp  (NIKON D610)        15.7mb /home/ei…urnal/photos/shooting Nikon D610.jpg
2014-01-30 16:41  7360x4912 36.2mp  (NIKON D810)        17.7mb /home/ei…urnal/photos/shooting Nikon D810.jpg
2014-02-19 13:47  6000x4000 24mp    (NIKON D3300)        9.8mb /home/ei…urnal/photos/shooting Nikon D3300.jpg
2014-04-17 16:43  3744x4992 18.7mp  (Lumia 1520)         4.6mb /home/ei…urnal/photos/shooting Nokia Lumia 1520.jpg
2014-04-24 12:18  3264x4928 16.1mp  (LEICA T (Typ 70…    3.1mb /home/ei…urnal/photos/shooting Leica T (Typ 701).jpg
2014-04-29 17:01  5472x3648 20mp    (Canon EOS 70D)      6.3mb /home/ei…urnal/photos/shooting Canon EOS 70D.jpg
2014-10-25 09:41  6016x4016 24.2mp  (NIKON D750)        11.5mb /home/ei…urnal/photos/shooting Nikon D750.jpg

Find photos taken in 2010:

chee find 'date/2010--2011'
2010-11-28 17:32  4928x3264 16.1mp  (NIKON D7000)        7.8mb /home/ei…urnal/photos/shooting Nikon D7000.jpg
2010-12-02 13:18  4608x3072 14.2mp  (NIKON D3100)        3.3mb /home/ei…urnal/photos/shooting Nikon D3100.jpg

Find photos taken in the two weeks following eastern 2014:

chee find 'date/2014-eastersun--+14d'
2014-04-24 12:18  3264x4928 16.1mp  (LEICA T (Typ 70…    3.1mb /home/ei…urnal/photos/shooting Leica T (Typ 701).jpg
2014-04-29 17:01  5472x3648 20mp    (Canon EOS 70D)      6.3mb /home/ei…urnal/photos/shooting Canon EOS 70D.jpg
2014-04-29 17:07      x             (Canon EOS 70D)     21.4mb /home/ei…urnal/photos/shooting Canon EOS 70D.cr2

Also include photos taken a few days before:

chee find 'date/2014-eastersun#-4d--+14d'
2014-04-17 16:43  3744x4992 18.7mp  (Lumia 1520)         4.6mb /home/ei…urnal/photos/shooting Nokia Lumia 1520.jpg
2014-04-24 12:18  3264x4928 16.1mp  (LEICA T (Typ 70…    3.1mb /home/ei…urnal/photos/shooting Leica T (Typ 701).jpg
2014-04-29 17:01  5472x3648 20mp    (Canon EOS 70D)      6.3mb /home/ei…urnal/photos/shooting Canon EOS 70D.jpg
2014-04-29 17:07      x             (Canon EOS 70D)     21.4mb /home/ei…urnal/photos/shooting Canon EOS 70D.cr2

But only photos where height is greater than its width:

chee find "date/2014-eastersun#-4d--+14d height>'width"
2014-04-17 16:43  3744x4992 18.7mp  (Lumia 1520)         4.6mb /home/ei…urnal/photos/shooting Nokia Lumia 1520.jpg
2014-04-24 12:18  3264x4928 16.1mp  (LEICA T (Typ 70…    3.1mb /home/ei…urnal/photos/shooting Leica T (Typ 701).jpg

Of course, conditions can be combined the usual way (and, or and not). The query syntax is described in detail in the manual.

Organizing images

Searching is nice, but I actually like to organize images in some folder structure. I can find images without using any tool at all, because most of the time I'm looking for specific dates. This is very convenient to me. The dumps don't serve that at all. Instead I create a folder structure and symlink to the images in the dumps.

This can be achieved with the mktree command. It copies or symlinks images to a new location based on a given pattern. The path is obtained by applying this pattern to each file. The default pattern is what I find convenient… :): it simply organizes all photos in folders by month.

chee mktree --target ../sorted 'pixel>10m'
Symlink /home/eike/org/journal/photos/shooting/DCN102/Nikon D7000.jpg → /home/eike/org/journal/sorted/2010/11/28-17-32_Nikon D7000.jpg … Ok
Symlink /home/eike/org/journal/photos/shooting/DCN102/Nikon D3100.jpg → /home/eike/org/journal/sorted/2010/12/02-13-18_Nikon D3100.jpg … Ok
Symlink /home/eike/org/journal/photos/shooting/DCN102/Nikon D90.jpg → /home/eike/org/journal/sorted/2011/04/25-01-55_Nikon D90.jpg … Ok
Symlink /home/eike/org/journal/photos/shooting/DCN102/Nikon D300.jpg → /home/eike/org/journal/sorted/2011/04/25-03-53_Nikon D300.jpg … Ok
Symlink /home/eike/org/journal/photos/shooting/DCN102/Nikon D610.jpg → /home/eike/org/journal/sorted/2013/11/23-16-47_Nikon D610.jpg … Ok
Symlink /home/eike/org/journal/photos/shooting/DCN102/Nikon D810.jpg → /home/eike/org/journal/sorted/2014/01/30-16-41_Nikon D810.jpg … Ok
Symlink /home/eike/org/journal/photos/shooting/DCN102/Nikon D3300.jpg → /home/eike/org/journal/sorted/2014/02/19-13-47_Nikon D3300.jpg … Ok
Symlink /home/eike/org/journal/photos/shooting/DCN101/Nokia Lumia 1520.jpg → /home/eike/org/journal/sorted/2014/04/17-16-43_Nokia Lumia 1520.jpg … Ok
Symlink /home/eike/org/journal/photos/shooting/DCN101/Leica T (Typ 701).jpg → /home/eike/org/journal/sorted/2014/04/24-12-18_Leica T (Typ 701).jpg … Ok
Symlink /home/eike/org/journal/photos/shooting/DCN101/Canon EOS 70D.jpg → /home/eike/org/journal/sorted/2014/04/29-17-01_Canon EOS 70D.jpg … Ok
Symlink /home/eike/org/journal/photos/shooting/DCN102/Nikon D750.jpg → /home/eike/org/journal/sorted/2014/10/25-09-41_Nikon D750.jpg … Ok
11 files processed in 0:00:00.113

The resulting folder structure is this:

tree sorted
sorted
├── 2010
│   ├── 11
│   │   └── 28-17-32_Nikon D7000.jpg -> /home/eike/org/journal/photos/shooting/DCN102/Nikon D7000.jpg
│   └── 12
│       └── 02-13-18_Nikon D3100.jpg -> /home/eike/org/journal/photos/shooting/DCN102/Nikon D3100.jpg
├── 2011
│   └── 04
│       ├── 25-01-55_Nikon D90.jpg -> /home/eike/org/journal/photos/shooting/DCN102/Nikon D90.jpg
│       └── 25-03-53_Nikon D300.jpg -> /home/eike/org/journal/photos/shooting/DCN102/Nikon D300.jpg
├── 2013
│   └── 11
│       └── 23-16-47_Nikon D610.jpg -> /home/eike/org/journal/photos/shooting/DCN102/Nikon D610.jpg
└── 2014
    ├── 01
    │   └── 30-16-41_Nikon D810.jpg -> /home/eike/org/journal/photos/shooting/DCN102/Nikon D810.jpg
    ├── 02
    │   └── 19-13-47_Nikon D3300.jpg -> /home/eike/org/journal/photos/shooting/DCN102/Nikon D3300.jpg
    ├── 04
    │   ├── 17-16-43_Nokia Lumia 1520.jpg -> /home/eike/org/journal/photos/shooting/DCN101/Nokia Lumia 1520.jpg
    │   ├── 24-12-18_Leica T (Typ 701).jpg -> /home/eike/org/journal/photos/shooting/DCN101/Leica T (Typ 701).jpg
    │   └── 29-17-01_Canon EOS 70D.jpg -> /home/eike/org/journal/photos/shooting/DCN101/Canon EOS 70D.jpg
    └── 10
        └── 25-09-41_Nikon D750.jpg -> /home/eike/org/journal/photos/shooting/DCN102/Nikon D750.jpg

12 directories, 11 files

But a custom pattern can be specified to the --pattern option to create other trees. An explanation about format patterns is in the manual. The find command uses the same pattern to format its output, so it can be used to experiment with patterns befor passing them to mktree.

Organize files by extension and weekday of the time a photo was taken:

chee mktree --target ../sorted --pattern '~:ext/~#created~fE/~#file' 'pixel>10m'
Symlink /home/eike/org/journal/photos/shooting/DCN102/Nikon D7000.jpg → /home/eike/org/journal/sorted/jpg/So/Nikon D7000.jpg … Ok
Symlink /home/eike/org/journal/photos/shooting/DCN102/Nikon D3100.jpg → /home/eike/org/journal/sorted/jpg/Do/Nikon D3100.jpg … Ok
Symlink /home/eike/org/journal/photos/shooting/DCN102/Nikon D90.jpg → /home/eike/org/journal/sorted/jpg/Mo/Nikon D90.jpg … Ok
Symlink /home/eike/org/journal/photos/shooting/DCN102/Nikon D300.jpg → /home/eike/org/journal/sorted/jpg/Mo/Nikon D300.jpg … Ok
Symlink /home/eike/org/journal/photos/shooting/DCN102/Nikon D610.jpg → /home/eike/org/journal/sorted/jpg/Sa/Nikon D610.jpg … Ok
Symlink /home/eike/org/journal/photos/shooting/DCN102/Nikon D810.jpg → /home/eike/org/journal/sorted/jpg/Do/Nikon D810.jpg … Ok
Symlink /home/eike/org/journal/photos/shooting/DCN102/Nikon D3300.jpg → /home/eike/org/journal/sorted/jpg/Mi/Nikon D3300.jpg … Ok
Symlink /home/eike/org/journal/photos/shooting/DCN101/Nokia Lumia 1520.jpg → /home/eike/org/journal/sorted/jpg/Do/Nokia Lumia 1520.jpg … Ok
Symlink /home/eike/org/journal/photos/shooting/DCN101/Leica T (Typ 701).jpg → /home/eike/org/journal/sorted/jpg/Do/Leica T (Typ 701).jpg … Ok
Symlink /home/eike/org/journal/photos/shooting/DCN101/Canon EOS 70D.jpg → /home/eike/org/journal/sorted/jpg/Di/Canon EOS 70D.jpg … Ok
Symlink /home/eike/org/journal/photos/shooting/DCN102/Nikon D750.jpg → /home/eike/org/journal/sorted/jpg/Sa/Nikon D750.jpg … Ok
11 files processed in 0:00:00.77

The directive ~#<name> prints the value of the property name. The value can be modified with the ~f directive that applies a format pattern to the result of ~#<name>. In case of the created property the ~fE extracts the weekday from the date value. Then the parts are separated by a / resulting in a path that is appended to the value of the --target option.

The resulting tree:

tree ../sorted
../sorted
└── jpg
    ├── Di
    │   └── Canon EOS 70D.jpg -> /home/eike/org/journal/photos/shooting/DCN101/Canon EOS 70D.jpg
    ├── Do
    │   ├── Leica T (Typ 701).jpg -> /home/eike/org/journal/photos/shooting/DCN101/Leica T (Typ 701).jpg
    │   ├── Nikon D3100.jpg -> /home/eike/org/journal/photos/shooting/DCN102/Nikon D3100.jpg
    │   ├── Nikon D810.jpg -> /home/eike/org/journal/photos/shooting/DCN102/Nikon D810.jpg
    │   └── Nokia Lumia 1520.jpg -> /home/eike/org/journal/photos/shooting/DCN101/Nokia Lumia 1520.jpg
    ├── Mi
    │   └── Nikon D3300.jpg -> /home/eike/org/journal/photos/shooting/DCN102/Nikon D3300.jpg
    ├── Mo
    │   ├── Nikon D300.jpg -> /home/eike/org/journal/photos/shooting/DCN102/Nikon D300.jpg
    │   └── Nikon D90.jpg -> /home/eike/org/journal/photos/shooting/DCN102/Nikon D90.jpg
    ├── Sa
    │   ├── Nikon D610.jpg -> /home/eike/org/journal/photos/shooting/DCN102/Nikon D610.jpg
    │   └── Nikon D750.jpg -> /home/eike/org/journal/photos/shooting/DCN102/Nikon D750.jpg
    └── So
        └── Nikon D7000.jpg -> /home/eike/org/journal/photos/shooting/DCN102/Nikon D7000.jpg

7 directories, 11 files

The idea for the format patterns is inspired by the FORMAT function of common lisp. It allows quite flexible output. If the format becomes to complex it can be bookmarked in the configuration file and refered to by name. Please see again the manual for more on that.

Instead of symlinking, mktree can also copy the file in case you want to put some to other places.

The dumps together with one or two symlink trees are already very useful to me.

Cleaning up

It occurs that I find directories with images that are not indexed but chances are high that there are duplicates in my dumps. The find command can be used to search a directory for files that are indexed or not.

The following command searches a clone of this repository for files that are indexed. It should print all those that were imported at the beginning of this text.

chee find --indexed true -r -f ../extractor-images
2010-12-02 13:18  4608x3072 14.2mp  (NIKON D3100)        3.3mb /home/ei…rnal/extractor-images Nikon D3100.jpg
2006-12-16 12:42  2000x3008 6mp     (NIKON D40)          2.9mb /home/ei…rnal/extractor-images Nikon D40.jpg
2014-01-30 16:41  7360x4912 36.2mp  (NIKON D810)        17.7mb /home/ei…rnal/extractor-images Nikon D810.jpg
2014-04-17 16:43  3744x4992 18.7mp  (Lumia 1520)         4.6mb /home/ei…rnal/extractor-images Nokia Lumia 1520.jpg
1999-01-27 12:13  1344x1008 1.4mp   (Dimage EX)        549.5kb /home/ei…rnal/extractor-images Minolta DiMAGE EX.jpg
2015-12-10 21:18  1280x960  1.2mp   ()                 257.7kb /home/ei…rnal/extractor-images Nikon E900 (2).jpg
2014-10-25 09:41  6016x4016 24.2mp  (NIKON D750)        11.5mb /home/ei…rnal/extractor-images Nikon D750.jpg
2014-04-29 17:01  5472x3648 20mp    (Canon EOS 70D)      6.3mb /home/ei…rnal/extractor-images Canon EOS 70D.jpg
2001-09-01 11:18  2048x1536 3.1mp   (DiMAGE S304)        1.7mb /home/ei…rnal/extractor-images Minolta DiMAGE S304.jpg
2014-02-19 13:47  6000x4000 24mp    (NIKON D3300)        9.8mb /home/ei…rnal/extractor-images Nikon D3300.jpg
2004-01-02 14:26  3008x2000 6mp     (NIKON D100)         2.1mb /home/ei…rnal/extractor-images Nikon D100.jpg
2011-04-25 01:55  4288x2848 12.2mp  (NIKON D90)            3mb /home/ei…rnal/extractor-images Nikon D90.jpg
2001-04-06 11:51   800x600  480kp   (E950)             160.3kb /home/ei…rnal/extractor-images Nikon E950.jpg
2011-03-12 15:36   858x570  489.1kp (NIKON D5000)      256.2kb /home/ei…rnal/extractor-images Nikon D5000.jpg
2007-07-19 19:46  3072x2304 7.1mp   (Canon DIGITAL I…    3.2mb /home/ei…rnal/extractor-images Canon IXUS 750.jpg
2004-11-21 21:29  3008x2000 6mp     (NIKON D70)          1.5mb /home/ei…rnal/extractor-images Nikon D70.jpg
2000-12-30 10:18  2048x1536 3.1mp   (E990)                 1mb /home/ei…rnal/extractor-images Nikon E990.jpg
2004-06-29 15:29  1600x1200 1.9mp   (E775)               392kb /home/ei…rnal/extractor-images Nikon E775.jpg
2004-02-22 14:27   126x115  14.5kp  (E5000)               88kb /home/ei…rnal/extractor-images Nikon E5000.jpg
2015-12-10 21:18   600x450  270kp   ()                 301.8kb /home/ei…rnal/extractor-images Nikon E885.jpg
2001-06-09 15:17   640x480  307.2kp (Canon DIGITAL I…    125kb /home/ei…rnal/extractor-images Canon IXUS.jpg
2002-11-23 14:38  1600x1200 1.9mp   (Canon DIGITAL I…      1mb /home/ei…rnal/extractor-images Canon IXUS v2.jpg
2005-07-03 00:36  2272x1704 3.9mp   (Canon DIGITAL I…    1.5mb /home/ei…rnal/extractor-images Canon IXUS 430.jpg
2015-12-10 21:18  1280x960  1.2mp   ()                 267.2kb /home/ei…rnal/extractor-images Nikon E900 (1).jpg
2003-09-13 16:10  2560x1920 4.9mp   (DiMAGE A1)          2.2mb /home/ei…rnal/extractor-images Minolta DiMAGE A1.jpg
2002-08-22 15:38  1920x2560 4.9mp   (E5700)                2mb /home/ei…rnal/extractor-images Nikon E5700.jpg
2011-04-25 03:53  4288x2848 12.2mp  (NIKON D300)         6.4mb /home/ei…rnal/extractor-images Nikon D300.jpg
2003-08-06 18:04   600x391  234.6kp (NIKON D1X)         99.5kb /home/ei…rnal/extractor-images Nikon D1X.jpg
2002-05-16 15:43  2272x1704 3.9mp   (DiMAGE S404)        1.8mb /home/ei…rnal/extractor-images Minolta DiMAGE S404.jpg
2001-08-09 23:08  1600x1200 1.9mp   (Canon DIGITAL I…  701.8kb /home/ei…rnal/extractor-images Canon IXUS 300.jpg
2013-11-23 16:47  6016x4016 24.2mp  (NIKON D610)        15.7mb /home/ei…rnal/extractor-images Nikon D610.jpg
2014-04-24 12:18  3264x4928 16.1mp  (LEICA T (Typ 70…    3.1mb /home/ei…rnal/extractor-images Leica T (Typ 701).jpg
2002-09-07 11:33  1280x960  1.2mp   (DiMAGE X)         481.7kb /home/ei…rnal/extractor-images Minolta DiMAGE X.jpg
2001-09-01 11:14  1536x2048 3.1mp   (DiMAGE 5)           1.4mb /home/ei…rnal/extractor-images Minolta DiMAGE 5.jpg
2002-11-23 21:24   614x460  282.4kp (Canon DIGITAL I…   63.5kb /home/ei…rnal/extractor-images Canon IXUS v3.jpg
2001-07-01 18:55  1920x2560 4.9mp   (DiMAGE 7)           2.5mb /home/ei…rnal/extractor-images Minolta DiMAGE 7.jpg
2002-11-11 11:01  2560x1920 4.9mp   (DiMAGE 7Hi)         2.6mb /home/ei…rnal/extractor-images Minolta DiMAGE 7Hi.jpg
2003-09-06 14:45  1136x852  967.9kp (Canon DIGITAL I…     92kb /home/ei…rnal/extractor-images Canon IXUS 400.jpg
2010-11-28 17:32  4928x3264 16.1mp  (NIKON D7000)        7.8mb /home/ei…rnal/extractor-images Nikon D7000.jpg
2014-04-29 17:07      x             (Canon EOS 70D)     21.4mb /home/ei…rnal/extractor-images Canon EOS 70D.cr2

The format pattern must be changed to only output the full path to a file (maybe wrapped in "). Then it can be combined with other shell commands like rm.

chee find --indexed true --pattern '"~#path"~%' -r -f ../extractor-images
"/home/eike/org/journal/extractor-images/jpg/Nikon D3100.jpg"
"/home/eike/org/journal/extractor-images/jpg/Nikon D40.jpg"
"/home/eike/org/journal/extractor-images/jpg/Nikon D810.jpg"
"/home/eike/org/journal/extractor-images/jpg/Nokia Lumia 1520.jpg"
"/home/eike/org/journal/extractor-images/jpg/Minolta DiMAGE EX.jpg"
"/home/eike/org/journal/extractor-images/jpg/Nikon E900 (2).jpg"
"/home/eike/org/journal/extractor-images/jpg/Nikon D750.jpg"
"/home/eike/org/journal/extractor-images/jpg/Canon EOS 70D.jpg"
"/home/eike/org/journal/extractor-images/jpg/Minolta DiMAGE S304.jpg"
"/home/eike/org/journal/extractor-images/jpg/Nikon D3300.jpg"
"/home/eike/org/journal/extractor-images/jpg/Nikon D100.jpg"
"/home/eike/org/journal/extractor-images/jpg/Nikon D90.jpg"
"/home/eike/org/journal/extractor-images/jpg/Nikon E950.jpg"
"/home/eike/org/journal/extractor-images/jpg/Nikon D5000.jpg"
"/home/eike/org/journal/extractor-images/jpg/Canon IXUS 750.jpg"
"/home/eike/org/journal/extractor-images/jpg/Nikon D70.jpg"
"/home/eike/org/journal/extractor-images/jpg/Nikon E990.jpg"
"/home/eike/org/journal/extractor-images/jpg/Nikon E775.jpg"
"/home/eike/org/journal/extractor-images/jpg/Nikon E5000.jpg"
"/home/eike/org/journal/extractor-images/jpg/Nikon E885.jpg"
"/home/eike/org/journal/extractor-images/jpg/Canon IXUS.jpg"
"/home/eike/org/journal/extractor-images/jpg/Canon IXUS v2.jpg"
"/home/eike/org/journal/extractor-images/jpg/Canon IXUS 430.jpg"
"/home/eike/org/journal/extractor-images/jpg/Nikon E900 (1).jpg"
"/home/eike/org/journal/extractor-images/jpg/Minolta DiMAGE A1.jpg"
"/home/eike/org/journal/extractor-images/jpg/Nikon E5700.jpg"
"/home/eike/org/journal/extractor-images/jpg/Nikon D300.jpg"
"/home/eike/org/journal/extractor-images/jpg/Nikon D1X.jpg"
"/home/eike/org/journal/extractor-images/jpg/Minolta DiMAGE S404.jpg"
"/home/eike/org/journal/extractor-images/jpg/Canon IXUS 300.jpg"
"/home/eike/org/journal/extractor-images/jpg/Nikon D610.jpg"
"/home/eike/org/journal/extractor-images/jpg/Leica T (Typ 701).jpg"
"/home/eike/org/journal/extractor-images/jpg/Minolta DiMAGE X.jpg"
"/home/eike/org/journal/extractor-images/jpg/Minolta DiMAGE 5.jpg"
"/home/eike/org/journal/extractor-images/jpg/Canon IXUS v3.jpg"
"/home/eike/org/journal/extractor-images/jpg/Minolta DiMAGE 7.jpg"
"/home/eike/org/journal/extractor-images/jpg/Minolta DiMAGE 7Hi.jpg"
"/home/eike/org/journal/extractor-images/jpg/Canon IXUS 400.jpg"
"/home/eike/org/journal/extractor-images/jpg/Nikon D7000.jpg"
"/home/eike/org/journal/extractor-images/cr2/Canon EOS 70D.cr2"

The ~% directive prints a newline. The result is the full path of each file wrapped in quotation marks to honor spaces in file names. This can be combined with other shell commands, for example rm:

chee find --indexed true --pattern '"~#path"~%' -r -f ../extractor-images | xargs rm

Note that there isn't a duplicate command that finds duplicate files within the index. This is scheduled for a future version.

More …

Thanks for reading! I hope this text shows how chee can be used to do some useful stuff. Chee is still in development but quite useful to me already. You can check it out on github there is a download link and some install instructions. Feedback/questions is most welcome, of course! You can drop me a mail to eikek at posteo.de or open an issue.

Date: 2016-10-18

Author: Eike

Created: 2016-10-19 Mi 01:08

Validate