Mosh clean script
This commit is contained in:
10
bin/mosh-clean.ps1
Executable file
10
bin/mosh-clean.ps1
Executable file
@@ -0,0 +1,10 @@
|
|||||||
|
#!/usr/bin/env pwsh
|
||||||
|
|
||||||
|
$days = 5
|
||||||
|
|
||||||
|
$to_delete = ps *mosh-server* | ? { $_.RunTime -gt (New-TimeSpan -Days $days) }
|
||||||
|
foreach ($proc in $to_delete) {
|
||||||
|
$proc | fl Id,RunTime
|
||||||
|
kill $proc
|
||||||
|
}
|
||||||
|
|
||||||
Reference in New Issue
Block a user