show hidden files terminal code example

Example 1: view hidden files ls

$ ls -a
OR
$ ls -al

Example 2: hide hidden files mac

defaults write com.apple.Finder AppleShowAllFiles false
#Change 'false' by 'true' to show hidden files
killall Finder

Example 3: how to view hidden files in mac terminal

defaults write com.apple.finder AppleShowAllFiles YES

Example 4: mac show hidden files

>> To show hidden files, hold down: Cmd + Shift + . (dot) 
  
 >> Hold down Cmd + Shift + . (dot) a second time to hide the files again.

Example 5: mac hidden files shortcut

Toggle hidden files on macOS: Command + Shift + .

Example 6: ls show hidden files

$ ls -a
$ ls -al

Tags:

Misc Example