https://github.com/jftuga/gostat
display and set file timestamps
https://github.com/jftuga/gostat
Last synced: 10 months ago
JSON representation
display and set file timestamps
- Host: GitHub
- URL: https://github.com/jftuga/gostat
- Owner: jftuga
- License: mit
- Created: 2021-03-29T12:15:42.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2024-01-03T03:25:11.000Z (over 2 years ago)
- Last Synced: 2025-05-27T10:54:29.397Z (about 1 year ago)
- Language: Go
- Size: 12.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# gostat
display and set file timestamps
For more information on Birth Time, Modify Time, Access Time, and Create Time, please see the Wikipdia article on [MAC times](https://en.wikipedia.org/wiki/MAC_times).
Binaries for Windows, MacOS, and Linux are provided on the [Releases](https://github.com/jftuga/gostat/releases) page.
## Usage
```
Usage: gostat [OPTION]... [FILE]...
Display and set file time stamps
-a string
set file access time, format: YYYYMMDD.HHMMSS
-b string
set both access and modify time, format: YYYYMMDD.HHMMSS
-m string
set file modify time, format: YYYYMMDD.HHMMSS
-v show program version and then exit
```
## Example - display times
```
PS C:\github.com\jftuga\gostat> .\gostat.exe go.*
name : go.mod
size : 84
btime : 2021-03-29 10:31:20.7843427 -0400 EDT
ctime : 2021-03-29 10:31:28.8303228 -0400 EDT
mtime : 2021-03-29 10:31:28.8303228 -0400 EDT
atime : 2021-03-29 10:31:28.8303228 -0400 EDT
name : go.sum
size : 171
btime : 2021-03-29 10:31:28.8347262 -0400 EDT
ctime : 2021-03-29 10:31:28.8347262 -0400 EDT
mtime : 2021-03-29 10:31:28.8347262 -0400 EDT
atime : 2021-03-29 10:31:28.8347262 -0400 EDT
```
## Example - change access time
```
PS C:\github.com\jftuga\gostat> .\gostat.exe -a 20210329.090807 .\README.md
2021-03-29 09:08:07 -0400 EDT
name : .\README.md
size : 43
btime : 2021-03-29 08:16:26.7001842 -0400 EDT
ctime : 2021-03-29 10:55:21.2762476 -0400 EDT
mtime : 2021-03-29 08:16:26.7001842 -0400 EDT
atime : 2021-03-29 09:08:07 -0400 EDT
```