---
title: Install ls-having on Arch Linux using the Snap Store | Snapcraft
description: Get the latest version of ls-having for on Arch Linux - A command-line
  tool for finding directories based on specified flag files and other conditions
url: https://snapcraft.io/install/ls-having/arch
---

[Canonical Snapcraft](https://snapcraft.io/)

# Install ls-having on **Arch Linux**

# ls-having

[handy-common-utils (james-hu)](https://snapcraft.io/publisher/james-hu "View all snaps from handy-common-utils (james-hu)")

* [handy-common-utils (james-hu)](https://snapcraft.io/publisher/james-hu "View all snaps from handy-common-utils (james-hu)")
* [Development](https://snapcraft.io/search?categories=development)
* [Utilities](https://snapcraft.io/search?categories=utilities)

[Install](https://snapcraft.io/install/ls-having/arch#install)

#### A command-line tool for finding directories based on specified flag files and other conditions

`ls-having` is a powerful open-source tool that makes it easy to find directories. With a simple and intuitive command-line interface, "ls-having" allows you to quickly search for directories based on specified flag files and other conditions, saving you time and effort. Whether you're a developer who works with mono repos, or you just need an easy way to find your directories, "ls-having" is the perfect tool for you.

* Flexible search options: "ls-having" allows you to specify various options and conditions for searching for directories, such as flag files, the check file, regular expressions for matching the check file, excludes, and maximum depth.
* Configurable error handling: "ls-having" provides an option for configuring how it handles errors such as non-existing directory or no access permission, allowing users to customize and integrate the tool for different situations.
* Cross-platform support: "ls-having" is available for Linux, MacOS, and Windows.
* Small and quick: "ls-having" has just one native executable file, there is no dependency on anything else, and the tool is just about 2MB in size. It starts and runs very quickly.

**Quick start**

Try this:

`ls-having -f package.json`

This will search for directories containing a "package.json" file in the current directory and print the names of those directories to the console. You can then use the output of "ls-having" as arguments for other commands, such as "xargs", to perform actions on those directories.

For more information on how to use "ls-having" and the available options and arguments, visit <https://github.com/handy-common-utils/ls-having> or run the `ls-having --help` command.

**Usage**

```
 Usage: ls-having -f name-or-glob [options] [root-dir]
 Options:
   -c, --check-file name          name of the additional file to check
   -i, --check-inverse            regard regular expression not matching as positive
   -e, --check-regexp expression  regular expression for testing the content of the check file (default ".*")
   -d, --depth int                how deep to look into subdirectories, 0 means only look at root directory, -1 means no limit (default 5)
   -r, --error string             how to handle errors such like non-existing directory, no access permission, etc. (ignore|panic|print) (default "ignore")
   -x, --exclude glob             glob of the directories to exclude, this option can appear multiple times
   -f, --flag-file glob           name or glob of the flag file, this option can appear multiple times
   -h, --help                     show help information
   -a, --match-all-flag-files      require all (instead of any) of the flag file names/globs to be matched
   -n, --no-default-excludes      don't apply default excludes
   -0, --print0                   separate paths in the output with null characters (instead of newline characters)
   -s, --subdirectories-only      don't return root directory even if it meets conditions
 References:
   Glob syntax: https://github.com/gobwas/glob#example
   Regexp syntax: https://pkg.go.dev/regexp/syntax
   Home page: https://github.com/handy-common-utils/ls-having
```

**Examples**

Find all directories in `./` having `package.json` file,
and run `npm audit fix` in them one by one:

`ls-having -f package.json | xargs -I {} bash -c 'cd "{}"; npm audit fix'`

Find all directories in `./` having `package.json` file
and the `package.json` file does not contain `"volta":`:

`ls-having -c package.json -i -e '"volta":'`

Find all directories in `./` having `cdk.json` file
and the `package.json` file in the directory has `mocha` specified as a dependency,
then for each of those directories reinstall latest version of `mocha` as dev-dependency:

`ls-having -f cdk.json -c package.json -e '"dependencies":\s*{[^{}]*"mocha":' | xargs -I {} bash -c 'cd {}; npm i -D mocha@latest'`

Find all directories in `~/myrepo1` having `build.gradle` file and a sibling directory `australia`:

`ls-having -f build.gradle -c ../australia ~/myrepo1`

### Package name

* ls-having

---

### License

* Apache-2.0

---

### Last updated

* 27 May 2023 - latest/stable
* 27 May 2023 - latest/edge

This snap hasn't been updated in a while. It might be unmaintained and have stability or security issues.

---

### Websites

* [github.com/handy-common-utils/ls-having](https://github.com/handy-common-utils/ls-having "https://github.com/handy-common-utils/ls-having")

---

##### Report a Snap Store violation

* [Report this Snap](https://snapcraft.io/install/ls-having/arch#report-snap-modal)

---

## Enable snaps on Arch Linux and install ls-having

Snaps are applications packaged with all their dependencies to run on all popular Linux distributions from a single build. They update automatically and roll back gracefully.

Snaps are discoverable and installable from the [Snap Store](https://snapcraft.io/store), an app store with an audience of millions.

### Enable snapd

On Arch Linux, snap can be installed from the [Arch User Repository (AUR).](https://aur.archlinux.org/packages/snapd/)
The [manual build process](https://wiki.archlinux.org/index.php/Arch_User_Repository#Installing_packages) is the Arch-supported
install method for AUR packages, and you’ll need the [prerequisites](https://wiki.archlinux.org/index.php/Arch_User_Repository#Prerequisites)
installed before you can install any AUR package. You can then install snap with the following:

```
git clone https://aur.archlinux.org/snapd.git
cd snapd
makepkg -si
```

Once installed, the *systemd* unit that manages the main snap communication socket needs to be enabled:

```
sudo systemctl enable --now snapd.socket
```

If [AppArmor](https://wiki.archlinux.org/title/AppArmor) is enabled in your system, enable the service which loads AppArmor profiles for snaps:

```
sudo systemctl enable --now snapd.apparmor.service
```

To enable *classic* snap support, enter the following to create a symbolic link between `/var/lib/snapd/snap` and `/snap`:

```
sudo ln -s /var/lib/snapd/snap /snap
```

Either log out and back in again, or restart your system, to ensure snap’s paths are updated correctly.

### Install ls-having

To install ls-having, simply use the following command:

```
sudo snap install ls-having
```

### Other popular snaps…

[See more...](https://snapcraft.io/search?categories=featured)

[See more in Featured](https://snapcraft.io/search?categories=featured)

### More things to do…

#### [Get the snap store](https://snapcraft.io/snap-store)

Browse and find snaps from the convenience of your desktop using the snap store snap.

#### [Learn more about snaps](https://snapcraft.io/docs)

Interested to find out more about snaps? Want to publish your own application? Visit [snapcraft.io](https://snapcraft.io/) now.

[Back to top](https://snapcraft.io/install/ls-having/arch)

© 2026 Canonical Ltd.
Ubuntu and Canonical are registered trademarks of Canonical Ltd.

Powered by [Charmed Kubernetes](https://www.ubuntu.com/kubernetes)

[Join the forum](https://forum.snapcraft.io/), contribute to or report problems with,
[snapd](https://bugs.launchpad.net/snapd),
[Snapcraft](https://bugs.launchpad.net/snapcraft),
or [this site](https://github.com/canonical/snapcraft.io/issues/new).

* [Share on Twitter](https://twitter.com/snapcraftio)
* [Share on Facebook](https://www.facebook.com/snapcraftio)
* [Share on YouTube](https://www.youtube.com/snapcraftio)

* [Terms of Service](https://ubuntu.com/legal/terms-and-policies/snap-store-terms)
* [Data privacy](https://www.ubuntu.com/legal/data-privacy)
* [Manage your tracker settings](https://snapcraft.io/install/ls-having/arch)
* [Service status](https://status.snapcraft.io/)
* [Other functions](https://dashboard.snapcraft.io/)
* [Contact us](https://snapcraft.io/about/contact-us)
