Section: Retain and Recall (1)
Updated: September 2007
rr - retain / recall file and directory paths
rr [/path/to/filename | /path/to/directory/]
rr [filename | directory/]
rr [exec command] [args ...]
rr is a basic command-line utility designed to retain/recall file and directory paths. This is done by treating the filename itself as a unique key to be referenced for future rr program calls. The purpose of this is to assist the user in shorthand typing and/or not having to remember arbitrary full paths.
All retained values are stored in ~/.rr, and are unique to each user. If you are attempting to retain a path that has a filename or directory that has already been retained before, rr will retain the new path over the old path.
When rr attempts to recall retained files or directories it will attempt to match the file or directory value explicitly. If this does not result in a match, rr will fall back and attempt to partially match the file or directory value up to the amount of characters provided.
Pass a file or directory value to stdin to be retained or recalled, then verbosely print it to stdout. This does not include the ability to execute commands listed below as it is thought to be a potential security risk.
- rr [/path/to/filename | /path/to/directory/]
Retain a file or directory, then verbosely print it to stdout. Note that directories are signified by a trailing slash.
- rr [filename | directory/]
Recall a file or directory that has been previously retained, then verbosely print it to stdout. Note that directories are signified by a trailing slash.
- rr [exec command] [args ...]
Execute a command using retained files and directories. In this form, retained values are referenced by a // prefix.
# Retain the path of the desired file, and verbosely print it out.
# Recall the retained value, and verbosely print it out.
# Execute vi on /etc/httpd/conf/httpd.conf. (designated by "//")
rr vi //httpd.conf
# Retain a directory path.
# Change directory to /etc/rc.d/init.d/
cd `rr init.d/`
# List files matching: /etc/rc.d/init.d/s*
# (the '*' may need to be quoted depending on your shell)
rr ls -l //init.d/s*
Written by v9/fakehalo. [email@example.com]
Report bugs to <firstname.lastname@example.org>.
Copyright © 2007 fakehalo.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
This document was created by man2html,
using the manual pages.