Skip to content

Instantly share code, notes, and snippets.

@rpalo
Created April 7, 2018 15:24
Show Gist options
  • Save rpalo/64aac7966995fc5414d5a91d5c7bb5c6 to your computer and use it in GitHub Desktop.
Save rpalo/64aac7966995fc5414d5a91d5c7bb5c6 to your computer and use it in GitHub Desktop.
# pwd
PS> Get-Location # or gl or pwd
# ls
PS> Get-ChildItem # or gci or dir or ls
# cd
PS> Set-Location # or sl or chdir or cd
# cp
PS> Copy-Item # or copy or cpi or cp
# mv
PS> Move-Item # or move or mi or mv
# cat
PS> Get-Content # or gc or type
# mkdir
PS> New-Item -ItemType Directory # use ni for short
# touch
PS> New-Item -ItemType File # use ni for short
# rm
PS> Remove-Item # or del or erase or ri
# rm -rf
PS> Remove-Item -Recurse -Force
# head or tail
PS> Select-Object -first # or -last
# usage: Get-Process | Select-Object -first 10
# find
PS> Get-ChildItem -filter *.rb -recurse .
# but for a slightly easier to read version:
PS> Get-ChildItem -filter *.rb -recurse . | Select-Object FullName
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment