Skip to content

Conversation

@BlueGreenMagick
Copy link
Contributor

@BlueGreenMagick BlueGreenMagick commented Apr 9, 2022

Description

OS X uses a different stat command. From what I can tell, stat -f %m $file should be the equivalent to stat -c %Y $file. This PR detects the OS, and choose which stat command to use.

Keep in mind that I only tested it on the mac. There shouldn't be any side effects in linux, but I haven't tested it.

man OS X stat
man linux stat

Checklist:

Please replace the space inside the brackets with an x and fill out the ellipses if the following items apply:

@BlueGreenMagick
Copy link
Contributor Author

I forgot to check the existing PRs before writing my own and just realized that this PR is the subset of #17.

I can confirm that the mac command seems fine, although |sort at the end seems unnecessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant