How To Show Hidden Files In MacOS Finder

When you use MacOS finder to browse files, you can not see the hidden files by default. But sometimes you need to show those hidden files in MacOS finder to operate on them such as copy, move etc. This article will tell you two method to show hidden files in MacOS finder.

1. Press Command + Shift + . Key.

  1. Open MacOS finder and go to your desired folder.
  2. Then press Command + Shift + . key on the keyboard.
  3. It will show the hidden files in the finder. Press the key combination again, it will hide all those hidden files.
    show hidden files in macos finder

2. Enable Show Hidden Files Permanently By Script Alias.

If you want to display hidden files every time when you open a MacOS finder, you can write below script alias in MacOS user’s .bash_profile file, and then run the alias. After the alias execution when you open a finder, it will display the hidden files as you want.

  1. Open a terminal and run cd ~ to go to mac user home directory.
  2. Execute sudo vim .bash_profile in terminal to edit .bash_profile file.
  3. Press i to insert text in .bash_profile file. Input below script at the end of .bash_profile file.
    # Define show hidden files alias to show hidden files.
    alias showHiddenFiles='defaults write com.apple.finder AppleShowAllFiles YES; 
    # Relaunch MacOS Finder.
    killall Finder /System/Library/CoreServices/Finder.app'
    
    # Define hide hidden files alias to hide hidden files.
    alias hideHiddenFiles='defaults write com.apple.finder AppleShowAllFiles NO; 
    # Relaunch MacOS Finder.
    killall Finder /System/Library/CoreServices/Finder.app'
  4. Press esc :wq! to save above file.
  5. Run source .bash_profile to make the changes take effect.
  6. Run showHiddenFiles alias in terminal, then it will restart opened finder and display hidden files.
  7. Run hideHiddenFiles alias in terminal, then it will restart opened finder and hide hidden files.
(Visited 24 times, 1 visits today)
READ :   How To Merge Disk Partitions In Mac

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.