Listing directories
A listing of my favorite ls
features.
To know wich directory you're in now, use the pwd
command. pwd
stands for "print working directory".
> pwd/Users/sebastiandedeyne/Sites/test
List the current directory, use the ls
command. ls
is short for "list".
> lsREADME.md assets index.html
Include hidden files with -a
.
> ls -a. .. .git README.md assets index.html
List everything in a single column with -1
. This is useful when you want to copy/paste a directory.
> ls -1README.mdassetsindex.html
Add a trailing slash to directories with -F
. Also can be useful for copy/pasting purposes.
> ls -1FREADME.mdassets/index.html