Last active
November 26, 2024 13:04
-
-
Save carlosame/bf574478513ffd27324eb4dc8637d3aa to your computer and use it in GitHub Desktop.
PowerShell Profile
This file contains hidden or 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
## Store in Documents/PowerShell | |
# File hashes | |
function md5sum { Get-FileHash -Algorithm MD5 $args } | |
function sha1sum { Get-FileHash -Algorithm SHA1 $args } | |
function sha256sum { Get-FileHash -Algorithm SHA256 $args } | |
# Equivalent of bash `ll` alias | |
function ll { Get-ChildItem -Force @args } | |
# whereis, which | |
function whereis { if (-Not ($args)) { throw "Usage: whereis <name>" } Get-Command -All -ErrorAction "SilentlyContinue" $args | Format-Table CommandType, Name, Definition } | |
function which { if (-Not ($args)) { throw "Usage: which <name>" } (Get-Command -ErrorAction "SilentlyContinue" $args).Definition } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment