metastore(1)

πŸ’Ύ metastore β€” the manual, but make it cute

okay bestie, welcome to metastore(1) from the General Commands Manual πŸ’… this is the tool that remembers what your files are, not just what's inside them. sit down, grab a strawberry, let's go πŸ“


✨ NAME ✨

metastore β€” stores and restores filesystem metadata. that's it, that's the whole vibe. she saves the receipts and she brings them back 🫢


🌈 SYNOPSIS 🌈

metastore ACTION [OPTION...] [PATH...]

πŸ’– DESCRIPTION πŸ’–

so basically, metastore stores or restores metadata β€” and by metadata we mean owner, group, permissions, xattrs, and optionally mtime β€” for a whole filesystem tree. the way that it just… holds onto all of that for you?? iconic.

why would you even need this? because some tools are lowkey not that into metadata. git and tar, for example, usually do not store it. so metastore lets you preserve all that metadata anyway. it can also work as a lil tripwire situation, to detect any changes to metadata. very much giving security camera but for permissions πŸ“Ή

⚠️ bestie listen. e.g. SELinux stores its labels in xattrs, so please be careful when you're applying stored metadata β€” you gotta make sure the system security does not get compromised. no cap, this part matters. πŸ”₯

πŸŽ€ ACTIONS πŸŽ€

  • -c, --compare β€” shows you the difference between the stored metadata and the real metadata. it's giving "what changed, bestie" πŸ‘€
  • -s, --save β€” saves the current metadata to ./.metadata, or to a file you specify instead (peep the --file option below).
  • -a, --apply β€” attempts to apply the stored metadata onto the file system. put it back, put it back πŸ’…
  • -d, --dump β€” dumps stored metadata (if you don't give a PATH) or real metadata (if a PATH is present, e.g. ./) in human-readable form. pretty printing, but for files 🌸
😭 okay real talk: this action is only meant as a helpful debugging facility or a merge conflict helper. do not ever compare its output generated using different metastore versions. do not rely on the current output format (especially in batch scripts), because it may change in future without prior notice. fr fr, do not build anything on top of it.
  • -h, --help β€” prints a help message and exits. the classic. the moment. πŸ™ˆ

⭐ OPTIONS ⭐

  • -v, --verbose β€” causes metastore to print more verbose messages. you can repeat it more than once for even more verbosity. spam that flag, she'll keep talking ✨
  • -q, --quiet β€” causes metastore to print less verbose messages. can also be repeated more than once for even less verbosity. shhh 🀫
  • -m, --mtime β€” causes metastore to also take mtime into account for the compare or apply actions. timestamps are getting included in the group chat now ⏰
  • -e, --empty-dirs β€” also attempts to recreate missing empty directories. may be useful where empty directories are not tracked (e.g. by git or cvs). only works in combination with the apply option. yes she cares about the empty ones, they matter too πŸ₯Ί
  • -E, --remove-empty-dirs β€” also attempts to remove empty directories missing from the metadata. may be useful where empty directories are not tracked (e.g. by git or cvs). only works in combination with the apply option. the reverse move, and honestly? slay πŸ’…
  • -g, --git β€” prevents metastore from omitting .git directories. she sees the .git, she respects the .git πŸ‘‘
  • -f <file>, --file <file> β€” causes the metadata to be saved to, or read from, the specified file rather than ./.metadata. custom location, custom energy πŸ¦‹

🧚 PATHS 🧚

if no path is specified, metastore will use the current directory as the basis for the actions. this is the recommended way of executing metastore. periodt.

alternatively, one or more paths can be specified, and they will each be examined. later invocations should be made using the exact same paths to ensure that the stored metadata is interpreted correctly. like, same paths, bestie. exact. same. πŸ”₯


πŸ‘‘ AUTHORS πŸ‘‘

metastore was created by David HΓ€rdeman in 2007-2008. now it is maintained by PrzemysΕ‚aw PaweΕ‚czyk. all source code contributors are listed in the AUTHORS file. give them their flowers πŸ’


and that's the whole page!! this was the metastore(1) manual, from the General Commands Manual, dated January 2016. go forth and preserve some metadata, bestie πŸ’œβœ¨