pathup - find an enclosing directory
pathup name [ start ]
pathup -h
pathup --help
Starting from a directory start (defaults to the current directory), look for the first (i.e., most closely enclosing) ancestor directory with the specified name.
Searching for an ancestor named `.' simply returns the absolute path of the specified directory itself; searching for `..' returns its parent's absolute path.
Searching by an absolute path name returns that same path, unless the path doesn't specify an existing directory.
% cd /some/very/very/long/path % cd `pathup very` && pwd /some/very/very % pathup very /some/very % pathup foo Not found: 'foo' % cd /some/path/somewhere % pathup . /some/path/somewhere % pathup .. /some/path % pathup / /
Allow use of multiple-directory names (e.g., `pathup foo/bar`)?
Allow use of a grep pattern instead of a directory name.
1.01
Copyright 2003 Paul M. Hoffman. All rights reserved. This program is free software; you can redistribute it and modify it under the same terms as Perl itself.
To install pathup, copy and paste the appropriate command in to your terminal.
cpanm
cpanm pathup
CPAN shell
perl -MCPAN -e shell install pathup
For more information on module installation, please visit the detailed CPAN module installation guide.