Get files older than 5 minutes command line

From vpsget wiki
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