NAME

mark - a tool for marking and acting on file paths

SYNOPSIS

mark add <path>     # Add a file path to the mark list
mark remove <path>  # Remove a file path from the mark list
mark clear          # Remove all marks from list
mark ls             # List current marks
mark ls-print0      # List current marks, separated by NUL chars
mark cp             # Copy marked files to current directory
mark mv             # Move files to current directory and unmark
mark each <command> # Execute command with each marked file as parameter
mark -h             # Print help message

DESCRIPTION

mark stores a list of marked file paths in an SQLite database called marks.db in the user's home directory. Once marked, files can be copied, moved, listed, or passed as parameters to arbitrary shell commands.

Commands are intended to be invoked as subcommands of mark(1), in the style of git(1).

COMMANDS

mark-add

Add one or more paths to the mark list. Relative paths will be stored by their absolute location. Repeated commands are idempotent - a path can only appear once in the mark list.

mark-remove

Remove one or more paths from the mark list. Relative paths will be resolved to their absolute location before the list is searched.

mark-clear

Clear the entire mark list.

mark-ls

List all currently marked paths, one line per path.

mark-ls-print0

List all currently marked paths, separated by null characters, for use when piping to xargs -0 or other commands which expect null-terminated file lists. Analogous to find -print0. This is useful where filenames contain whitespace, quotes, etc.

mark-cp

Copy all marked paths to the current working directory.

mark-mv

Move all marked paths to the current working directory, and remove them from the mark list.

mark-each

Execute the provided command once per marked path, with the path as a parameter, and print any output from the command.

This is crudely analogous to xargs. While good enough for simple commands, it's likely to break in more complex cases, and may be slow for large mark lists. Consider using mark-ls-print0(1) and xargs(1) instead.

SEE ALSO

App::MarkFiles

LICENSE

mark is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

AUTHOR

Brennen Bearnes