Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/juhp/lsfrom
Tool to list files in a directory starting from a particular file
https://github.com/juhp/lsfrom
Last synced: 2 months ago
JSON representation
Tool to list files in a directory starting from a particular file
- Host: GitHub
- URL: https://github.com/juhp/lsfrom
- Owner: juhp
- License: other
- Created: 2018-03-07T03:58:23.000Z (almost 7 years ago)
- Default Branch: main
- Last Pushed: 2024-01-07T13:31:38.000Z (12 months ago)
- Last Synced: 2024-10-14T11:13:10.729Z (3 months ago)
- Language: Haskell
- Homepage: https://hackage.haskell.org/package/lsfrom
- Size: 28.3 KB
- Stars: 2
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: ChangeLog.md
- License: LICENSE
Awesome Lists containing this project
README
# lsfrom
`lsfrom` lists the files and dirs in a directory starting from
the given filename or the first file after that
if the file does not exist, using the current locale collation order.```shellsession
$ ls
A a B C
$ echo $(lsfrom a)
a B C
$ lsfrom a/
a
B
C
$ lsfrom /sy
/sys
/tmp
/usr
/var
```It can be useful for continuing a script on the entries of a directory
after a failure, etc:```shellsession
$ myscript.sh $(lsfrom next)
```or only running a command on a subrange of files in a directory.
## Usage
`$ lsfrom --version`
```
1.0
```
`$ lsfrom -h`
```
List directories files starting from fileUsage: lsfrom [--version] [-s|--strict] [-A|--all] [-a|--after]
[-u|--until LASTFILE] [-b|--before] STARTFILElsfrom lists the files in a directory that follow from the given file
Available options:
-h,--help Show this help text
--version Show version
-s,--strict fail if specified file(s) do not exist
-A,--all include hidden (dot) files
-a,--after files after STARTFILE [default: from STARTFILE]
-u,--until LASTFILE files until FILE
-b,--before files before LASTFILE (only affects --until)
```## Requirements
It uses `ls` to list files with locale sorting
and requires the `-A` option to exclude `.` and `..` (ie coreutils).
It also uses `sort` when injecting missing marker files.
It has been tested on Linux.## Installation
`stack install lsfrom` or `cabal install lsfrom`.
## Contribute or feedback
lsfrom is distributed with BSD license
and the project is hosted at .