---
title: "List directory structure except one or more dirs"
description: "Ever wanted to display the structure of the current directory except or two directories?"
canonical: https://oozou.com/til/list-directory-structure-except-one-or-more-dirs-24
locale: en
date: 2020-10-13
topic: shell
---

# List directory structure except one or more dirs

> Ever wanted to display the structure of the current directory except or two directories?

Published: 2020-10-13 · Topic: [shell](https://oozou.com/til-topics/shell) ([markdown](https://oozou.com/til-topics/shell.md))

Ever wanted to display the structure of the current directory except or two directories?

```shell
#NPM or yarn project
tree -I node_modules
```

```shell
# Elixir Mix project
tree -I 'deps|test'
```

---

Contact OOZOU: hello@oozou.com · +66 2544 0000 · https://oozou.com/contact

More for AI agents: https://oozou.com/llms.txt · every page has a markdown twin at its URL plus ".md"
