lsfrom: List directory files starting from a specific name

[ bsd3, program, utility ] [ Propose Tags ]

lsfrom lists the contents of a directory starting from a particular prefix and those files after it with respect to locale collation. This can be useful for example for continuing a command or script in a directory after a failure.


[Skip to Readme]

Downloads

Maintainer's Corner

For package maintainers and hackage trustees

Candidates

Versions [RSS] 0.1, 0.1.1, 0.1.1.1
Change log ChangeLog.md
Dependencies base (<5), filepath, simple-cmd, simple-cmd-args (>=0.1.1) [details]
License BSD-3-Clause
Copyright 2018,2021-2022 Jens Petersen
Author Jens Petersen <petersen@redhat.com>
Maintainer Jens Petersen <petersen@redhat.com>
Category Utility
Home page https://github.com/juhp/lsfrom
Bug tracker https://github.com/juhp/lsfrom/issues
Source repo head: git clone https://github.com/juhp/lsfrom.git
Uploaded by JensPetersen at 2022-04-24T13:03:18Z
Distributions Fedora:0.1.1.1, NixOS:0.1.1.1
Executables lsfrom
Downloads 124 total (3 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs not available [build log]
Last success reported on 2022-04-24 [all 1 reports]

Readme for lsfrom-0.1.1.1

[back to package description]

lsfrom

lsfrom lists the files and dirs in a directory starting from the first one that matches the given filename prefix or the first filename after that if there is no match, using the current locale collation order.

$ ls
A a B C
$ lsfrom a
a
B
C
$ lsfrom a/
B
C
$ lsfrom /sy
/sys
/sysroot
/tmp
/usr
/var

This may be useful for continuing a script on the content of a directory after a failure, etc:

$ myscript.sh $(lsfrom next)

Requirements

It uses system ls order to preserve locale collation and requires ls with the -A option to exclude . and .. (eg coreutils). 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 https://github.com/juhp/lsfrom.