grepbydate
Show events from log files converting input date formats to a unique format: '%Y-%m-%d %H:%M:%S'.
- Format dates in specified input files.
- Transparently works on *.gz and *.xz files.
- Transparently transforms audit.log timestamps.
- Shows full stack trace if starting line matches the filtering options.
- Optional filtering by a time range.
- Optional filtering by Regexp. (Optionally ignore case)
Usage
usage: grepbydate [-h] [-f DATE_FROM] [-i] [-t DATE_TO] [-s SEARCH] inputfiles [inputfiles ...]
Show events from log files converting input date formats to a unique format: '%Y-%m-%d %H:%M:%S'.
positional arguments:
inputfiles (Required). file/s to read.
options:
-h, --help show this help message and exit
-f, --from DATE_FROM (Optional). Filter from this datetime.
-i, --ignorecase (Optional). Ignore case on the search Regular Expression.
-t, --to DATE_TO (Optional). Filter until this datetime.
-s, --search SEARCH (Optional). Filter lines using this Regex.
Supported date format for `--from` and `--to` filters: ['%Y-%m-%d', '%Y-%m-%d %H', '%Y-%m-%d %H:%M', '%Y-%m-%d %H:%M:%S', '%Y-%m-%dT%H',
'%Y-%m-%dT%H:%M', '%Y-%m-%dT%H:%M:%S']
Examples
- Get events from
/var/logrecursively from a specific date to last available date:
grepbydate -f 2025-06-02 /var/log/
- Get events from
/var/logand/var/lib/pgsl/data/loginto a time range:
grepbydate -f "2025-06-02 12:34:07" -t "2025-06-02 12:34:09" /var/log/ /var/lib/pgsql/data/log/
- Get events from input files matching
Katello.*errorregular expresion.
grepbydate $(find /var/log/foreman/ -type f) -s "Katello.*error"
- Get
openedandclosedsessions from/var/log/secure-2025*ignoring case.
grepbydate /var/log/secure-2025* -s "OPEned|CLosed" -i
Metadata
Release files for grepbydate 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| grepbydate-0.0.2.tar.gz | 17.5 kB | With provenance | Details for grepbydate-0.0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| grepbydate-0.0.2-py3-none-any.whl | Python 3 | none | any | Details for grepbydate-0.0.2-py3-none-any.whl |
Total release size: 35.9 kB
Release files / grepbydate-0.0.2.tar.gz
| Download URL | grepbydate-0.0.2.tar.gz |
|---|---|
| Size | 17.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5866a20c4fa1ec3800114043abb30714c6eaadab6275341d7a8c8ee966f55a96
|
|
BLAKE2b-256 checksum How to use checksums |
38ed5892c9fa7c67bd9018e5bb08bfe85d2792e7cbd6059905ba2bafcd6373b6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 10, 2026.
Transparency logRelease files / grepbydate-0.0.2-py3-none-any.whl
| Download URL | grepbydate-0.0.2-py3-none-any.whl |
|---|---|
| Size | 18.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
24473a31ca24ad8e0cef7aaee5787dcbb21ab757c523850ac7cb385bde133e5a
|
|
BLAKE2b-256 checksum How to use checksums |
dddc29ec1eda4ee53dc61fe6a53d0cd5405c78b8e3b978748e792df5ad602df8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 10, 2026.
Transparency logSecurity for grepbydate 0.0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for grepbydate-0.0.2.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 10, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.