Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/sindresorhus/find-up-cli

Find a file by walking up parent directories
https://github.com/sindresorhus/find-up-cli

Last synced: about 1 month ago
JSON representation

Find a file by walking up parent directories

Awesome Lists containing this project

README

        

# find-up-cli

> Find a file by walking up parent directories

## Install

```sh
npm install --global find-up-cli
```

## Usage

```
$ find-up --help

Usage
$ find-up

Options
--cwd= Working directory
--all Output all matching files, not just the first

Example
$ echo $PWD
/Users/sindresorhus/foo/bar
$ find-up unicorn.png
/Users/sindresorhus/unicorn.png
$ find-up unicorn.png --all
/Users/sindresorhus/foo/unicorn.png
/Users/sindresorhus/unicorn.png
```

## Example

```
/
└── Users
└── sindresorhus
├── unicorn.png
└── foo
└── bar
├── baz
└── faz
```

```
$ echo $PWD
/Users/sindresorhus/foo/bar/faz
$ find-up unicorn.png
/Users/sindresorhus/unicorn.png
```

## Related

- [find-up](https://github.com/sindresorhus/find-up) - API for this module