Highlighted

Unix Time (mtime)?

Contributor ,
Oct 03, 2014

Copy link to clipboard

Copied

I have a command line that finds files in a folder and deletes the ones that are a over a day old. I can't seem to find a way/the write code to change the 1 (full) day into a half day (12) hours (f -mtime +1 -exec rm -rf {} ) = older than a day. Do you need to convert into milliseconds and then figure out what a half day is in milliseconds?

TOPICS
Getting started

Views

316

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Unix Time (mtime)?

Contributor ,
Oct 03, 2014

Copy link to clipboard

Copied

I have a command line that finds files in a folder and deletes the ones that are a over a day old. I can't seem to find a way/the write code to change the 1 (full) day into a half day (12) hours (f -mtime +1 -exec rm -rf {} ) = older than a day. Do you need to convert into milliseconds and then figure out what a half day is in milliseconds?

TOPICS
Getting started

Views

317

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Oct 03, 2014 0

Have something to add?

Join the conversation