User Tools

Site Tools


windows:windows_cheatsheet

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
windows:windows_cheatsheet [2023/09/13 14:30] – created dodgerwindows:windows_cheatsheet [2023/10/25 15:15] (current) dodger
Line 5: Line 5:
 ===== history ===== ===== history =====
 ==== history list ==== ==== history list ====
-<code powershell+<code powershell>
 Get-History Get-History
 </code> </code>
  
 ==== execute history command ==== ==== execute history command ====
-<code powershell+<code powershell>
 Invoke-History 1 Invoke-History 1
 </code> </code>
Line 17: Line 17:
 ===== find ===== ===== find =====
 ==== find -type f ==== ==== find -type f ====
-<code powershell+<code powershell>
 Get-ChildItem -Path . -Recurse -Attributes Archive Get-ChildItem -Path . -Recurse -Attributes Archive
 </code> </code>
Line 25: Line 25:
 ===== grep ===== ===== grep =====
 ==== grep string file ==== ==== grep string file ====
-<code powershell+<code powershell>
 Select-String -pattern "ams-pve-bamboo" file.log Select-String -pattern "ams-pve-bamboo" file.log
 </code> </code>
  
 +===== tail =====
 +==== tail -f file ====
 +<code powershell>
 +Get-Content filename.log -Wait
 +</code>
 +
 +
 +===== zero/empty a file =====
 +<code powershell>
 +Clear-Content C:\Temp\TestFile.txt
 +</code>
  
  
  
windows/windows_cheatsheet.1694615429.txt.gz · Last modified: 2023/09/13 14:30 by dodger