Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"find" command cant parse date/time #11

Open
misterEarly opened this issue Jan 12, 2022 · 7 comments
Open

"find" command cant parse date/time #11

misterEarly opened this issue Jan 12, 2022 · 7 comments

Comments

@misterEarly
Copy link
Contributor

when i try to run the file, the "find" command throws an error

find: Can't parse date/time: @86400

@artonge
Copy link
Collaborator

artonge commented Jan 12, 2022

Can you tell me what OS you are using and the version of find ?

@misterEarly
Copy link
Contributor Author

My server is hosted on a web provider, and I don't seem to have the right permissions/packages (don't have apt or anything similar) to find everything. This is what I managed:

uname -a

FreeBSD s18.server.hostpoint.ch 12.2-RELEASE-p10 FreeBSD 12.2-RELEASE-p10 #3 12803d8a99c(releng/12.2)-dirty: Wed Aug 25 08:33:52 UTC 2021     root@fbsd-build01.adm.hostpoint.ch:/usr/obj/usr/src/amd64.amd64/sys/HOSTPOINT  amd64

@misterEarly
Copy link
Contributor Author

I changed the "@86400" to "1 day" manually and ran it again.
Now the "stat" command throws an error:

stat: illegal option -- c

@artonge
Copy link
Collaborator

artonge commented Jan 12, 2022

The stat command is to have the file's mtime, feel free to open a PR if you find a way that work on freebsd and other linux distributions

@Tie-fighter
Copy link

I, like many others, are also using TrueNAS.

Did anybody succeed with "ls -c" or "date -r" ?

@artonge
Copy link
Collaborator

artonge commented Feb 15, 2022

Here is a version that checks the mtime with an if instead of with find: https://github.com/nextcloud-gmbh/mtime_fixer_tool_kit/blob/40ba968a1b5d6decad4008f1deae754139b0b27d/solvable_files.sh

@Tie-fighter
Copy link

btw. it seems that stat -f '%m' is the equivalent for FreeBSD
(https://unix.stackexchange.com/questions/437222/the-bsds-stat-option-equivalent-to-y-in-gnu)

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

No branches or pull requests

3 participants