Archives
Trending
Support
Login
clear text
XML
Django
JavaScript
MATLAB
C
C++
C#
Python
SQL
Shell
Bash
Markdown
YAML
JSON
HTML
CSS
PHP
Java
Ruby
Go
Rust
Swift
Kotlin
Arduino
TypeScript
Perl
Autohotkey
Lua
SQF
R
Scala
Haskell
Groovy
Dart
Clojure
VB.NET
Objective-C
PowerShell
Bash
CoffeeScript
Verilog
## Search log files with lines starting with "2025-10-01T11:18:37.843" like date format to get first and last timestamps to show what time ranges are in the log file to help locate info ls your_log_folder -PipelineVariable file | ForEach-Object { $dates = @( sls '^\d\d\d\d-\d\d-\d\dT\d\d:\d\d:\d\d\.\d+' -Path $file.FullName ) ; if( $dates.Count -gt 0 ) { [pscustomobject]@{ File = $file.Name ; Start = "$(([datetime]($dates[0].matches[0].value)).ToString('G'))"; End = $(if($dates.Count -gt 1) { "$(([datetime]($dates[-1].matches[0].value)).ToString('G'))" } ); 'Duration(m)' = $(if($dates.Count -gt 1) { ([datetime]$dates[-1].matches[0].value - [datetime]$dates[0].matches[0].value).TotalMinutes } )} } }
Mark as private (unlisted)
for 30 minutes
for 6 hours
for 1 day
for 1 week
for 1 month
for 1 year
everlasting (like CCCP)