Quick Reference

... stands for individual file(s), e.g. AA.txt

Basics

metafs               list mounted volumes
metafs -l            list mounted volumes with details
metafs -a            list all known volumes
metafs -al           list all known volumes with details
metafs vol mount/    mount (& create) volume
metafs -u vol        unmount volume
metafs -u mount/     unmount volume by mount point
metafs -d vol        drop/delete unmounted volume

following commands can only be used within a mounted volume:

mfsinfo              display fs/volume info
mfsck                perform fs/volume check
metabusy format      empty volume

mls                  list directory (like ls)
mls -l               list directory with details of each file/item(s)
mls -la              list all details of the file/item(s)
mls -l ...           list particular items/files, e.g. mls -l AA.txt

mfind term           search a term in name, title, keywords, tags, full text search (fts), location
mfind key:term       search a term key specific. e.g. fts:echo  or  name:AA.txt
mfind -e term        regular expression
mfind /term/         regular expression
mfind -ei term       regular expression + case-insensitive
mfind /term/i        regular expression + case-insensitive
mfind key:/term/i    key specific, regular expression + case-insensitive
mfind -H key:        display histogram

mmeta --key=val ...  set metadata, e.g. "--title=Test Title"
mmeta --tags[]=red,blue ...   set an array, e.g. for tags
mmeta --key ...      display just a key
mmeta --key= ...     remove a key

mtag +tag ...        add a tag
mtag -tag ...        remove a tag
mtag =tag1,tag2 ...  set multiple tags (removes existing ones)
mtag = ...           remove all tags

marc c a.marc ...    create archive with file(s) incl. all metadata
marc a a.marc ...    add to archive file(s)
marc t a.marc        display table of content (toc)
marc x a.marc        extract from archive
     +v              verbose, e.g. marc cv a.marc ...
     +z              enable compression (for c or a), e.g. marc cz a.marc ...
     +p              pretend, don't do anything but show what would be done
                     if archive name is '-' then stdin or stdout is considered

Location/GPS

mmeta --location.city=Berlin ...            add GPS coordinate via city name
mmeta --location.city=Vienna --location.country=US ...    additionally define country to reduce ambiguity
mfind location:Berlin                       find file(s) near GPS coordinate (10km default range)
mfind location:city=Berlin,dist=200km       find file(s) near GPS coordinate within 200km range
mfind location:city=Denver,dist=130mi       find file(s) near GPS coordinate within 150mi range

Images

mfind image.color.type:bw                   find black & white images
mfind image.color.bw:black-on-white         find black & white images, with black on white
mfind image.color.bw:white-on-black         find black & white images, with white on black
mfind image.color.type:gray                 find grayscale images
mfind image.color.gray:black-on-white       find grayscale images, with black on white
mfind image.color.gray:white-on-black       find grayscale images, with white on black
mfind image.color.type:monochrome           find monochrome (uni color) images
mfind image.color.type:limited              find limited colored images (e.g. illustrations)
mfind image.color.type:full                 find full color images

mfind image.illumination:{c}                c = dark, balanced, bright

mfind image.theme.{col}:{n}%                col = red, orange, green, cyan, blue, violet, magenta,
                                                  pink, gray, black, white, transparent
                                            n = 0..100
mfind 'image.theme.red>50%'
mfind 'image.theme.red:10%..40%' 'image.theme.yellow>20%' 'image.pixels>5M'
mfind 'image.theme.transparent:~50%'

mfind image.pixels:5M..10M
mfind image.width:1024..4096
mfind image.size.ratio:16/9

Audio & Video

mfind 'audio.duration>10min'
mfind 'audio.duration:5..8min'
mfind 'audio.duration:~6min'

mfind 'video.duration:40..60min'

Administration

mfind -H size:                   show distribution of file sizes
mfind -H size:0..100KB           show distribtion of file sizes 0..100KB
mfind -H mime:                   show distribution of MIME types

mfind 'utime<10 days ago'        list files which are less than 10 days ago changed
mfind 'ctime:~2015'              find files created in fs/volume around year 2015
mfind 'ctime:2015'               find files created in fs/volume exact in year 2015
mfind 'ctime:2015/06'               in 2015/06
mfind 'ctime:2015/04/02'            in 2015/04/02 (that day)

Smart Values & Expressions

Smart Expressions used with mfind only:

value1..value2             value1 .. value2 which themselves can be "smart values"
~value                     about or around with common sense margin

Smart Values used with mmeta and mfind:

absolute timing (date):

2015                       2015/07/02 00:00:00
2015/01                    2015/01/15 00:00:00
2015/04/01                 2015/04/01 12:00:00
2015/04/10 13:15           2015/04/10 13:15:00
2015/04/10 14:15:20
200AD                      200/07/02 00:00:00
50BC                       -49/07/02 00:00:00

relative timing (ago or ahead):

10s ago         [s,sec,secs] seconds (default)
1m ago          [m,min,mins] minutes (60 seconds)
1.5hr ago       [h,hr,hrs,hours] hours (60 minutes)
2dy ago         [d,dy,day,days] days  (24 hours)
3wks ago        [w,wk,wks,week,weeks] weeks (7 days)
5mo ago         [mo,mos,month,months] months (30.5 days)
12yr ago        [y,yr,year,years] years (365.25 days)
20dec ago       [de,dec,decade,decades] decades (10 years)
3cent ago       [c,ce,cent,cents,century,centuries] centuries (100 years)
10mil ago       [mi,mil,millenia] millenia (1000 years)

large numbers:

1K      Kilo  (1000,  10^3)
2.5M    Mega  (1000^2,10^6)
3.2G    Giga  (1000^3,10^9)
1.5T    Tera  (1000^4,10^12)
8.8P    Peta  (1000^5,10^15)
20E     Exa   (1000^6,10^18)
7Z      Zetta (1000^7,10^21)
1.5Y    Yotta (1000^8,10^24)

storage numbers:

1KB     [KB,KiB] Kilobytes  (1024^1)
2.5MB   [MB,MiB] Megabytes  (1024^2)
3.2GB   [GB,GiB] Gigabytes  (1024^3)
1.5TB   [TB,TiB] Terabytes  (1024^4)
8.8PB   [PB,PiB] Petabytes  (1024^5)
20EB    [EB,EiB] Exabytes   (1024^6)
7ZB     [ZB,ZiB] Zettabytes (1024^7)
1.5YB   [YB,YiB] Yottabytes (1024^8)

distances:

1nm         nanometer  (10^-9)
2.1um       micrometer (10^-6)
5.5mm       millimeter (10^-3)
3cm         centimeter (10^-2)
5.1dm       decimeter  (10^-1)
2m or mt    meter      (default)
3km         kilometer  (10^3)
2" or 2in   inches     (0.0254m)
4' or 4ft   feet       (0.3048m)
5mi         miles      (1609.34m)
8nmi        nautic miles (1852m)
2au or 2AU  astronomical unit (149,597,870.7m)
2.5ly       lightyears (9.4607 10^15 m)
3pc         parsecs    (3.0856776 10^16 m)

time (duration):

5ns        [ns] nanoseconds (10^-9)
1us        [us] microseconds (10^-6)
3ms        [ms] milliseconds (10^-3)
2s         [s,sec,secs] seconds (default)
1m         [m,min,mins] minutes (60 seconds)
1.5hr      [h,hr,hrs,hours] hours (60 minutes)
2dy        [d,dy,day,days] days (24 hours)
3wks       [w,wk,wks,week,weeks] weeks (7 days)
5mo        [mo,mos,month,months] months (30.5 days)
12yr       [y,yr,year,years] years (365.25 days)
20dec      [de,dec,decade,decades] decades (10 years)
3cent      [c,ce,cent,cents,century,centuries] centuries (100 years)
10mil      [mi,mil,millenia] millenia (1000 years)

misc:

15.6%       percent -> 0.156

Best Practice Metadata

system core:

name              filename
size              data size in bytes
hash              SHA-256 hex hash
mime              MIME type, e.g. image/jpeg, text/plain, text/html, application/pdf

otime             origin time, when the data came to be (e.g. date a book was written)
ctime             creation time within fs/volume
mtime             modification time of data (may be earlier than ctime)
utime             update time (like mtime, but includes metadata changes)
atime             access time (read or write)

media independent:

author            author of data *)
title             title of data *)
keywords          keywords (alike terms -> better searching results) *)
tags              tagging (unique terms) used by mtag command
copyright         creator or copyright holder
license           under which condition data can be used e.g. "CC BY-SA", "GPLv2", "MIT License"
location          .city, .country and/or .lat & .long, eventually .elevation and .body

media dependent:

image.title       title of image (-> title)
image.author      photographer or creator of graphics (-> author)
image.mtime       when the photo was taken (-> mtime)

image.painting.author  author (artist) of the photographed painting (-> image.author)
image.painting.title   title of painting

text.author       author of the text
text.title        title of text (-> title)
text.mtime        when the text was modified
text.rtime        release date
text.keywords     array of keywords (-> keywords)

audio.title       title of audio, e.g. MP3 title automatically extracted
audio.author
video.title       title of video
video.author

*) may be mapped from media dependent keys (e.g. text.author -> author) automatically, also consider

  1. avoid using artist, go strictly with the term author this way regardless of media (text, audio, video etc) and artistic implication, the author can be looked up and sorted accordingly (e.g. mfind -H author:)
  2. don't manually overwrite automatically extracted metadata, your changes will be lost when item is updated or transfered as it will re-extract the metadata again; correct metadata preferably in the original data (e.g. edit title or keywords in the .odt file via OpenOffice/LibreOffice, and re-export as PDF)
  3. if you have to override automatically extracted metdata, set them aside, e.g. text.original.author which will override text.author (& author) - this as last remedy