The find command performs a search for a post Markdown file by filename substring.
You can use this command from any subdirectory in your main Octopress directory. The command allows you to identify one or more posts by any unique substring in the Markdown filename, including by date as this is included in every post filename.
oc find <post filename substring>
|post filename substring||a substring in the Markdown filename|
oc find "2013-08-31"
oc find "2013-08"
oc find "2013"
By Unique Word in the Title
oc find zombie
By Unique Substring in the Title
oc find "star-wars"
You can select one or more posts by date of Markdown file creation with a unique date string because each Markdown file is timestamped with its date of origin in the filename. Use one of the formats shown above to find one or more posts on a specific day, or during your specified combination of day, month, and year.
You can select one or more posts with a unique word in the post Markdown filename. The find command performs a case insensitive search for the word that you submit. Unless you manually modify them, all post Markdown filenames are in lower case characters.
You can select one or more posts with a unique substring in the post Markdown filename. Please familiarize yourself with the filename format for your post Markdown files. They include a date, followed by the post title, and lastly the .markdown file suffix.
The date strings and words in the filename are separated by dashes '-'. The dash character should be included in any multi-word (or date string) query that you submit with this command or any of the other Octopus commands that use filename substring search to locate your Markdown files. Here are a couple of examples:
oc find "multi-word-post-search"
oc find "2013-08"
Command Expansion with find
You can use your shell's command expansion feature to pass the result of the oc find command to any other application. The generic command syntax looks like this:
<shell command> $(oc find <search string>)
The result of the oc find command is used as the filename (or filenames if the search string is included in multiple posts) argument for the shell command.
Here is an example of how you gzip all posts that were generated on August 18th with the gzip application:
gzip $(oc find 08-18)