Skip to content

Instantly share code, notes, and snippets.

@tinotriste
Last active December 15, 2015 01:59
Show Gist options
  • Save tinotriste/5184243 to your computer and use it in GitHub Desktop.
Save tinotriste/5184243 to your computer and use it in GitHub Desktop.
Terminal: Print Directory Contents
List files in a directory:
ls -l /path/to/folder
List files on a per-subfolder basis:
ls -lR /path/to/folder
List all subfolders with formatted output (go ahead, copy and paste it to the Terminal)
cd /path/to/folder
ls -R | grep ":$" | sed -e 's/:$//' -e 's/[^-][^\/]*\//--/g' -e 's/^/ /' -e 's/-/|/'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment