Skip to content

Instantly share code, notes, and snippets.

@rjurney
Created October 4, 2019 15:46
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rjurney/998f4951a57bfa5daeb9a6c18f6f4827 to your computer and use it in GitHub Desktop.
Save rjurney/998f4951a57bfa5daeb9a6c18f6f4827 to your computer and use it in GitHub Desktop.
Function to put in ~/.bash_aliases to list only directories
# List only directories
lsd () {
if [ $# -eq 0 ]
then
LS_PATH=""
else
LS_PATH="$1/"
fi
ls -ld -- "$@"*/
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment