PowerShell: navigate directory
🟢 TIP: Command names and parameter names are case-insensitive.
Change Dir
cd(alias ofSet-Location)-
Change dir.
# go up one dir cd .. # go to home dir cd for dir name abbreviations, see PowerShell: Path Expansion
List Dir Content
dir(alias ofGet-ChildItem)-
List dir content.
Go to Previous Dir
popd(alias ofPop-Location)-
Go to a dir last pushed by
pushd. pushd(alias ofPush-Location)-
Push current dir path to a stack. Can go back to it by
popd.
PowerShell. List Dirs and Files
List Dirs
- PowerShell: navigate directory
- PowerShell: show current dir path
- PowerShell: list directories
- PowerShell: show directory as tree
- PowerShell: list empty dir 📜
- PowerShell: dir size 📜
List Files
- PowerShell: list files
- PowerShell: show fullpath, no truncate lines
- PowerShell: list empty files 📜
- PowerShell: count files
- PowerShell: list files by wildcard name pattern
- PowerShell: filter file name by regular expression
- PowerShell: sort files by size
- PowerShell: list large files 📜
- PowerShell: sort files by date
- PowerShell: search text in files (grep)