7 stable releases
new 1.1.5 | Apr 19, 2025 |
---|---|
1.1.3 | Sep 24, 2024 |
1.1.2 | Jul 24, 2024 |
1.0.0 | Jun 28, 2024 |
#128 in Filesystem
272 downloads per month
23KB
420 lines
FAST, Parallelized touch(1) file utility
This is Rust rewrite of classic POSIX touch
(1)
file utility for changing file timestamps.
This version works natively on Windows and Unix.
The touch
utility modifies file timestamps, allowing you to change access and modification times.
This Rust performance rewrite version uses tokio multi threaded backend for processing multiple files concurrently which gives it major speedups compared to other touch programs.
This is especially visible when working on network attached NFS or SMB drives. This speedups makes this version highly desirable for use in CI jobs, becayse you are billed per second.
For filename mask specification touch-cli uses glob format from glob crate. Glob format supports recursive touch (example: **/*.d) It allows you to update timestamps for files within subdirectories as well.
Command Line parameters
Glob patterns and following options are supported as command line arguments. Program uses getopt3 for options parsing, which have support for some extended parsing features such as grouping of options.
- -c do not create any files
- -a change only the access time
- -m change only the modification time
- -f ignored. In 4.4BSD Lite2 it is: Attempt to force the update, even if the file permissions do not currently permit it.
- -v output version and exit
- -? print help and exit
Default is to create new files and change both access and modification times.
Exit values
- Task completed without errors
- No mandatory file or pattern command line arguments supplied
- Glob command line expressions is wrong. Check proper syntax of glob pattern.
- Error while applying changes to file system
References
- GNU touch manpage from GNU coreutils
- Lite2 touch manpage from 4.4BSD-Lite2.
- Reno touch manpage from 4.3BSD-Reno.
Dependencies
~2.4–8.5MB
~65K SLoC