Git Product home page Git Product logo

folderz's Introduction

Folderz

List matching directories by file count.

Includes nested directories in file count but does not list child directories with same name.

Why?

I wanted to find out the biggest node_modules folders on my system, ordered from largest to smallest. I also didn't want to show seperate entries for nested node_modules folders.

Say you have the following structure

/myapp/
  node_modules/
    somePkg
        node_modules/
    somePkg2
      node_modules/
/myapp2/
  node_modules/
    somePkg
        node_modules/
/myapp3/
  node_modules/
    somePkg

Run this command to find all your largest node_modules directories and sort by size (and don't show nested children.)

folderz node_modules

Result

55 files in /myapp/node_modules
44 files in /myapp2/node_modules
33 files in /myapp3/node_modules

Install

# GET
git clone https://github.com/lukeaus/folderz.git
cd folderz
# or copy folderz file and paste on your computer

# MAKE EXECUTABLE
chmod +x folderz

# RUN
./folderz some-search-term
# or add folderz to your PATH then
folderz some-search-term

Usage

folderz [-d|--dir <arg>] [-p|--paths_only <arg>] [-q|--add_quotes <arg>] [-h|--help] <search_term>

Examples

Find all the parent node_modules folders in your home directory and return sorted results

folderz node_modules -d ~

Find all the parent node_modules folders in your home directory and return sorted paths only

folderz node_modules -d ~ -p

Find all the build folders in your apps directory

folderz build -d ~/apps

folderz's People

Contributors

lukeaus avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.