Update Windows/BackupGPO.md

This commit is contained in:
2024-03-02 16:37:32 +00:00
parent 2943e14188
commit 3e8fa614ac

View File

@@ -81,4 +81,12 @@ Get-ChildItem -Path $path -Recurse -Force | Where-Object { !$_.PSIsContainer } |
Get-ChildItem -Path $path -Recurse -Force | Where-Object { $_.PSIsContainer -and (Get-ChildItem -Path $_.FullName -Recurse -Force | Where-Object { !$_.PSIsContainer }) -eq $null } | Remove-Item -Force -Recurse
Remove-Item -Path $temp -Force
```
## possible command for the cronjob on the linux system
You can run this without the `-delete` and you will see affected files by the filter.
```bash
# -mtime +10 => older than 10 days
find /backup/gpos -mtime +10 -type f -delete
```