This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Get-ChildItem -Recurse | Measure-Object -Sum Length | |
OR | |
ls -r | measure -s Length |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Get-Content "path/to/file" | Select-Object -Last 10 | |
OR | |
gc "path/to/file" | select -Last 10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Get-ChildItem "C:\" -Recurse | |
| Where-Object {$_.extension -eq ".txt" } | |
| ForEach-Object { Write-Host $_.FullName } | |
-- OR -- | |
gci "C:\" -re | |
| ? { $_.extension -eq ".txt" } | |
| % { echo $_.FullName } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Get-ChildItem -Recures -Include * | |
| Where-Object { -not $_.PSIsContainer } | |
| Sort-Object Length -descending | |
| Select-Object -First 10 | |
| Select Name, Length | |
-- OR -- | |
gci -re -in * | |
| ?{-not $_.PSIsContainer} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
GetBlocks(aboutPage.TopLeftContentBox) | |
.Select(block => new ContentAreaItem() | |
{ | |
ContentLink = ((IContent)block).ContentLink | |
}) | |
.ToList() | |
.ForEach(cai => aboutPage.AdditionalContent.Items.Add(cai)); | |
_contentRepository.Save(aboutPage, SaveAction.Publish); |
NewerOlder