{"id":20826958,"url":"https://github.com/mklement0/fls","last_synced_at":"2025-05-07T20:43:28.623Z","repository":{"id":33093034,"uuid":"36730545","full_name":"mklement0/fls","owner":"mklement0","description":"A type-filtering wrapper for the standard ls Unix utility","archived":false,"fork":false,"pushed_at":"2025-03-10T23:17:53.000Z","size":779,"stargazers_count":12,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-07T20:43:20.748Z","etag":null,"topics":["cli","filesystem","filtering","ls","unix-cli"],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mklement0.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2015-06-02T12:09:44.000Z","updated_at":"2025-03-27T02:10:42.000Z","dependencies_parsed_at":"2024-02-21T03:25:16.065Z","dependency_job_id":null,"html_url":"https://github.com/mklement0/fls","commit_stats":{"total_commits":38,"total_committers":2,"mean_commits":19.0,"dds":0.3421052631578947,"last_synced_commit":"b80a87712e02e9d68164a5a8cd75b2f84476c07b"},"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mklement0%2Ffls","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mklement0%2Ffls/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mklement0%2Ffls/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mklement0%2Ffls/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mklement0","download_url":"https://codeload.github.com/mklement0/fls/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252954140,"owners_count":21830894,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","filesystem","filtering","ls","unix-cli"],"created_at":"2024-11-17T23:10:38.845Z","updated_at":"2025-05-07T20:43:28.599Z","avatar_url":"https://github.com/mklement0.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![npm version](https://img.shields.io/npm/v/fls.svg)](https://npmjs.com/package/fls) [![license](https://img.shields.io/npm/l/fls.svg)](https://github.com/mklement0/fls/blob/master/LICENSE.md)\n\n\u003c!-- START doctoc generated TOC please keep comment here to allow auto update --\u003e\n\u003c!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE --\u003e\n\n**Contents**\n\n- [fls \u0026mdash; Introduction](#fls-mdash-introduction)\n- [Examples](#examples)\n- [Installation](#installation)\n  - [Installation from the npm registry](#installation-from-the-npm-registry)\n  - [Manual installation](#manual-installation)\n- [Usage](#usage)\n- [License](#license)\n  - [Acknowledgements](#acknowledgements)\n  - [npm dependencies](#npm-dependencies)\n- [Changelog](#changelog)\n\n\u003c!-- END doctoc generated TOC please keep comment here to allow auto update --\u003e\n\n# fls \u0026mdash; Introduction\n\n`fls` \u0026mdash; **f**iltering **ls** \u0026mdash; is a **type-filtering wrapper** for the standard **`ls`** Unix utility.\n\nThe general idea is to **enhance `ls` with the ability to filter items by filesystem type** by specifying a filter expression as the first argument.  \nA filter expression is composed of **one or more optionally negatable filter characters based on the type-identifying chars. supported by [`find`'s `-type` primary](http://www.gnu.org/software/findutils/manual/html_node/find_html/Type.html#Type) and [Bash's file-test operators](http://www.gnu.org/software/bash/manual/html_node/Bash-Conditional-Expressions.html)**,  \nsuch as `f` for files, `d` for directories.\n\nBehind the scenes `ls` is ultimately invoked, so all of its options - except `-R` / `--recursive`, `--ignore`, `-f` and `-U` - are supported.  \nSpecifying a filter is optional, so `fls` can generally be used in lieu of `ls`, with a few restrictions detailed in the [manual](doc/fls.md).\n\nThe following example lists only subdirectories in the current directory, in long format:\n\n    fls d -l\n\n`fls` also lends itself to creating aliases; for instance, the following alias lists all executable (`x`) files (`f`):\n\n* `alias lsbin='fls fx'`\n\nThis alias can serve as a general `ls` replacement with fixed options, to which you may optionally pass filters as the first operand:\n\n* `alias lsx='fls -FAhl'`\n\nSee examples below, read concise [usage information](#usage) further below, or read the [manual](doc/fls.md).\n\n# Examples\n\n```shell\n# List all files (not directories) in the current dir.\nfls f\n\n# List all subdirs. of the user's home dir.\nfls d ~\n\n# List all symlinks to hidden files in long format in the user's home dir.\nfls lf -l ~/.*\n\n# List all executable files matching c* in /usr/local/bin\nfls xf /usr/local/bin/c*\n\n# List all empty (zero bytes) files in the current dir.\nfls fe\n\n# List all empty directories in the current dir, most recent one first.\nfls de -t\n\n# Use without filters:\nfls           # same as ls\nfls -lt ~     # same as ls -lt ~\nfls -lt -- pg # same as lf -lt pg; -- unambiguously marks 'pg' as file operand\n```\n\n# Installation\n\n**Supported platforms**\n\n* When installing from the **npm registry**: **Linux** and **OSX**\n* When installing **manually**: any **Unix-like** platform with **Bash** \n\n## Installation from the npm registry\n\nWith [Node.js](http://nodejs.org/) or [io.js](https://iojs.org/) installed, install [the package](https://www.npmjs.com/package/fls) as follows:\n\n    [sudo] npm install fls -g\n\n**Note**:\n\n* Whether you need `sudo` depends on how you installed Node.js / io.js and whether you've [changed permissions later](https://docs.npmjs.com/getting-started/fixing-npm-permissions); if you get an `EACCES` error, try again with `sudo`.\n* The `-g` ensures [_global_ installation](https://docs.npmjs.com/getting-started/installing-npm-packages-globally) and is needed to put `fls` in your system's `$PATH`.\n\n## Manual installation\n\n* Download [this `bash` script](https://raw.githubusercontent.com/mklement0/fls/stable/bin/fls) as `fls`.\n* Make it executable with `chmod +x fls`.\n* Move it or symlink it to a folder in your `$PATH`, such as `/usr/local/bin` (OSX) or `/usr/bin` (Linux).\n\n\n# Usage\n\nFind concise usage information below; for complete documentation, read the [manual online](doc/fls.md), or, once installed, run `man fls` (`fls --man` if installed manually).\n\n\u003c!-- DO NOT EDIT THE FENCED CODE BLOCK and RETAIN THIS COMMENT: The fenced code block below is updated by `make update-readme/release` with CLI usage information. --\u003e\n\n```nohighlight\n$ fls --help\n\n\nA type-filtering wrapper around the standard ls utility.\n\n    fls [\u003cfilter\u003e] [\u003coptions-for-ls\u003e] [\u003cdir\u003e]\n    fls [\u003cfilter\u003e] [\u003coptions-for-ls\u003e] \u003cfileOrDir\u003e...\n\n\u003cfilter\u003e is a string of filter characters; commonly used are:\n\n    f       file or symlink to file\n    d       dir or symlink to dir\n    l       symlink\n    x       executable file / searchable dir. (by you)\n    e       empty file (zero bytes) or empty dir. (no files or subdirs.)\n\nFilters are combined with logical AND, and filters placed after ^ are negated.  \nE.g., fls fx^l lists executable files that aren't symlinks.\n\nStandard options: --help, --man, --version, --home\n```\n\n\u003c!-- DO NOT EDIT THE NEXT CHAPTER and RETAIN THIS COMMENT: The next chapter is updated by `make update-readme/release` with the contents of 'LICENSE.md'. ALSO, LEAVE AT LEAST 1 BLANK LINE AFTER THIS COMMENT. --\u003e\n\n# License\n\nCopyright (c) 2015-2020 Michael Klement \u003cmklement0@gmail.com\u003e (http://same2u.net), released under the [MIT license](https://spdx.org/licenses/MIT#licenseText).\n\n## Acknowledgements\n\nThis project gratefully depends on the following open-source components, according to the terms of their respective licenses.\n\n[npm](https://www.npmjs.com/) dependencies below have optional suffixes denoting the type of dependency; the *absence* of a suffix denotes a required *run-time* dependency: `(D)` denotes a *development-time-only* dependency, `(O)` an *optional* dependency, and `(P)` a *peer* dependency.\n\n\u003c!-- DO NOT EDIT THE NEXT CHAPTER and RETAIN THIS COMMENT: The next chapter is updated by `make update-readme/release` with the dependencies from 'package.json'. ALSO, LEAVE AT LEAST 1 BLANK LINE AFTER THIS COMMENT. --\u003e\n\n## npm dependencies\n\n* [doctoc (D)](https://github.com/thlorenz/doctoc)\n* [json (D)](https://github.com/trentm/json)\n* [marked (D)](https://marked.js.org)\n* [marked-man (D)](https://github.com/kapouer/marked-man)\n* [replace (D)](https://github.com/ALMaclaine/replace)\n* [semver (D)](https://github.com/npm/node-semver)\n* [tap (D)](http://www.node-tap.org/)\n* [urchin (D)](https://git.sdf.org/tlevine/urchin)\n\n\u003c!-- DO NOT EDIT THE NEXT CHAPTER and RETAIN THIS COMMENT: The next chapter is updated by `make update-readme/release` with the contents of 'CHANGELOG.md'. ALSO, LEAVE AT LEAST 1 BLANK LINE AFTER THIS COMMENT. --\u003e\n\n# Changelog\n\nVersioning complies with [semantic versioning (semver)](http://semver.org/).\n\n\u003c!-- NOTE: An entry template for a new version is automatically added each time `make version` is called. Fill in changes afterwards. --\u003e\n\n* **[v0.4.0](https://github.com/mklement0/fls/compare/v0.3.3...v0.4.0)** (2021-08-19):\n  * An attempt to use `ls`'s `-R` / `--recursive` option now causes an error; it was never meaningfully supported.\n\n* **[v0.3.3](https://github.com/mklement0/fls/compare/v0.3.2...v0.3.3)** (2020-01-26):\n  * [dev] Updated the (design-time only) npm packages.\n\n* **[v0.3.2](https://github.com/mklement0/fls/compare/v0.3.1...v0.3.2)** (2018-07-26):\n  * [doc] Read-me formatting fixed.\n\n* **[v0.3.1](https://github.com/mklement0/fls/compare/v0.3.0...v0.3.1)** (2018-07-25):\n  * [dev] `npm`-package security vulnerabilities fixed - note that these vulnerabilities never affected _runtime_ operation.\n\n* **[v0.3.0](https://github.com/mklement0/fls/compare/v0.2.3...v0.3.0)** (2015-09-17):\n  * [BREAKING CHANGES] Filter characters streamlined to be (a) all-lowercase (`l` now accepted in addition to `L` and `h`),\n    `s` in addition to `S`; (b) new filter `e` for testing emptiness added, which supersedes the previous `s` filter with _opposite_ semantics.\n    `s` now means test for a socket, and what was previously `s` (non-emptiness test) can now be expressed more intuitively as\n    `^e` (negated emptiness test), and, conversely, a simple `e` tests for emptiness rather than the obsolete double-negative `^s`.\n\n* **[v0.2.3](https://github.com/mklement0/fls/compare/v0.2.2...v0.2.3)** (2015-09-16):\n  * [doc] man page improvements.\n\n* **[v0.2.2](https://github.com/mklement0/fls/compare/v0.2.1...v0.2.2)** (2015-09-16):\n  * [doc] `fls` now has a man page, and `-h` outputs concise usage information only.\n  * [fix] Filenames with backslashes are now handled correctly.\n\n* **[v0.2.1](https://github.com/mklement0/fls/compare/v0.2.0...v0.2.1)** (2015-09-15):\n  * [dev] Makefile improvements; various small behind-the-scenes fixes.\n\n* **[v0.2.0](https://github.com/mklement0/fls/compare/v0.1.5...v0.2.0)** (2015-07-26):\n  * **[breaking changes]**\n     * Behavior aligned with `ls` so as to facilitate use of `fls`-based aliases as general `ls` replacements with optional on-demand filtering.\n     * The filter argument may now be placed either before or after options; only _before_ options is it unambiguously a filter; alternatively,\n       following the first operand with `--` also unambiguously marks it as a filter.  \n       Options may now be intermingled with operands, even\n       on platforms whose `ls` implementation doesn't support it.\n     * Conversely, use `--` in lieu of a filter to explicitly requests that _no_ filtering be performed - the previously used `-` no longer works.\n     * If the first operand is not unambiguously specified as a filter and it is not a valid filter, it is treated as a file/dir. operand.\n     * `-d`, previously only used behind the scenes for _multiple_ operands, can now be used explicitly to request that a _single_ operand\n       that is a _directory_ be targeted as _itself_, as opposed to its contents.\n  * [fix] Filter validation improved to correctly detect mutually exclusive types and duplicate filters.\n  * [dev] Improved tests.\n\n* **[v0.1.5](https://github.com/mklement0/fls/compare/v0.1.4...v0.1.5)** (2015-07-18):\n  * [fix] Symlinks passed as file operands are now correctly detected, even if their targets do not exist.\n  * [dev] Test for above fix added, Makefile improvements.\n\n* **[v0.1.4](https://github.com/mklement0/fls/compare/v0.1.3...v0.1.4)** (2015-06-09):\n  * [doc] Attempt to fix problem with read-me formatting in the npm registry.\n  * [dev] Makefile updated.\n\n* **[v0.1.3](https://github.com/mklement0/fls/compare/v0.1.2...v0.1.3)** (2015-06-03):\n  * [doc] Read-me fixed and improved.\n  * [dev] Makefile updated.\n\n* **[v0.1.2](https://github.com/mklement0/fls/compare/v0.1.1...v0.1.2)** (2015-06-03):\n  * [doc] Read-me improved.\n\n* **[v0.1.1](https://github.com/mklement0/fls/compare/v0.1.0...v0.1.1)** (2015-06-03):\n  * [doc] Read-me improved.\n  * [dev] Makefile updated.\n\n* **v0.1.0** (2015-06-03):\n  * [dev] Version bumped to 0.1.0 to better reflect the level of maturity.\n  * [doc] TOC problem fixed.\n\n* **v0.0.2** (2015-06-03):\n  * [fix] Simple, but fundamental bug on Linux fixed (my apologies): no longer tries to use `command` with `exec`, which fails on Linux, because `command` is only a builtin (and was never needed to begin with).\n\n* **v0.0.1** (2015-06-03):\n  * Initial release.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmklement0%2Ffls","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmklement0%2Ffls","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmklement0%2Ffls/lists"}