Get files older than 5 minutes command line

From vpsget wiki
Revision as of 09:54, 6 February 2019 by Ndi (talk | contribs) (Created page with "How to get files created more than 5 minutes ago In Linux it's quite simple: find . -cmin +5 In Windows you can do it using PowerShell: Get-ChildItem -Path . -Recurs...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

How to get files created more than 5 minutes ago

In Linux it's quite simple:

find . -cmin +5


In Windows you can do it using PowerShell:

Get-ChildItem -Path . -Recurse| ? {$_.LastWriteTime -lt (Get-Date).AddMinutes(-5)}


The both examples will find the files created more than 5 minutes in current folder