Skip to content
This repository has been archived by the owner on Jul 30, 2018. It is now read-only.

⌨️ How to create a terminal alias to quickly show / hide hidden files

Notifications You must be signed in to change notification settings

riconaranjo/Show-and-Hide-Files

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 

Repository files navigation

How to Create Terminal Alias to Show/Hide Hidden Files

Update: As of macOS Sierra, there is now an easier way to show and hide file names: command + shift + ..

This causes the rest of this article to now be obsolete. If you still want to know how to create terminal aliases this is still a good introduction.

This is just a transcription of the instructions found online here, written by Ian Lunn.

A Terminal alias is a name or shortcut for one or multiple commands. Using an easy to remember alias, we can turn the above four step process into just one.

An alias can be made temporarily (just for the use of one terminal session) or permanently. As we want this to be a shortcut used now and in the future, let’s make it permanent:

  1. Open Terminal
  2. Type: sudo nano ~/.bash_profile
  3. Enter admin password
  4. At the bottom of the file enter: alias showFiles='defaults write com.apple.finder AppleShowAllFiles YES; killall Finder /System/Library/CoreServices/Finder.app'
  5. Below that, enter: alias hideFiles='defaults write com.apple.finder AppleShowAllFiles NO; killall Finder /System/Library/CoreServices/Finder.app'
  6. Press control + o followed by return to save file
  7. Press control + x to exit the file
  8. In the terminal type source ~/.bash_profile

Now, whenever you type showFiles into Termial, your Finder will refresh and start showing all the hidden files; alternately hideFiles will refresh Finder and stop showing hidden files.

About

⌨️ How to create a terminal alias to quickly show / hide hidden files

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published