Mac os finder show hidden files

Quickly Show/Hide Hidden Files on macOS Sierra, OS X El Capitan & Yosemite

Updates

Added shortcut method available on macOS Sierra keyboard.

Method of showing/hiding hidden files tested and working on macOS Sierra.

Method of showing/hiding hidden files tested and working on Mac OS X El Capitan.

It seems like every day I search Google for the command to show hidden files on Mac OS X, not to mention Googling for the command to then hide those hidden files a few minutes later.

Today I decided to make a short and easy to remember alias to speed up the process. All I need do now is type showFiles and hideFiles whenever I need to show/hide OS X’s hidden files. Here’s how you can do it too.

The Quickest Way to Show/Hide Hidden Files

Since the release of macOS Sierra, when in Finder, it is now possible to use the shortcut:

Press once to show hidden files and again to hide them. If you’re using a version earlier than macOS Sierra, see Show/Hide Hidden Files using Terminal Aliases to setup a toggle command via terminal.

Thanks to Guido Schlabitz for making me aware of this new shortcut.

Show/Hide Hidden Files the Long Way

The long way to show hidden Mac OS X files is as follows:

  1. Open Terminal found in Finder > Applications > Utilities
  2. In Terminal, paste the following: defaults write com.apple.finder AppleShowAllFiles YES
  3. Press return
  4. Hold the ‘Option/alt’ key, then right click on the Finder icon in the dock and click Relaunch.

Relaunch Finder by right clicking the Finder Icon whilst holding the `option/alt` key

This will show all hidden files. To hide them again, follow the same steps but replace the Terminal command with:

It’s not the longest set of instructions or the biggest command to commit to memory but if you’re doing this a lot, it’s worth spending a few minutes now to save yourself a lot more time in the future.

Show/Hide Hidden Files using Terminal Aliases

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 found in Finder > Applications > Utilities
  2. In Terminal, paste the following: sudo nano

/.bash_profile

  • Enter your Mac’s administration password if required, then hit return
  • At the bottom of the open .bash_profile file, paste the following: alias showFiles=’defaults write com.apple.finder AppleShowAllFiles YES; killall Finder /System/Library/CoreServices/Finder.app’

    Below that, paste the following: alias hideFiles=’defaults write com.apple.finder AppleShowAllFiles NO; killall Finder /System/Library/CoreServices/Finder.app’

  • Press ctrl + O and hit return to save the file
  • Press ctrl + X to exit the file and return to the command line
  • In Terminal, paste the following: source

    /.bash_profile to refresh your profile and make the aliases available

    Adding aliases to .bash_profile via Terminal

    Now when you want to show hidden files, all you need type in Terminal is showFiles , then hideFiles when you want to hide them.

    If you want to modify the behaviour or alias names, let’s take a closer look at the commands you just added:

    alias tells Terminal we’re adding a new alias.

    showFiles is the name of the alias. Change this to what you wish.

    We then give the alias two commands. The first being:

    This is the command to show hidden files and is ended with a semi-colon ; so we can then use the second command:

    This will relaunch the Finder (to replicate the step of holding the ‘Option/alt’ key then right clicking the Finder icon in the dock).

    Conclusion

    With the aliases set up, all you need do in the future is type showFiles and hideFiles to show and hide Mac OS X’s hidden files respectively.

    Aliases can be used to speed up your interaction with the Terminal. Set up an alias for navigating to your most used directories, to commit to a GitHub repo and so on.

    Ian Lunn is a Front-end Developer with 12 years commercial experience, author of CSS3 Foundations, and graduate of Internet Technology. He creates successful websites that are fast, easy to use, and built with best practices.

    Источник

    Showing hidden files and folders on a Mac

    Many files and folders are hidden on a Mac. There’s a good reason for this: Hiding files and folders prevents users from accidentally damaging the operating system. Nevertheless, sometimes you may need to access these files and folders. We’ll show you various options for viewing hidden files and folders on a Mac. However, use extreme caution: If you change or damage system files, it can have serious consequences for your operating system.

    Register great TLDs for less than $1 for the first year.

    Why wait? Grab your favorite domain name today!

    Why are some files and folders hidden?

    There are good reasons for hiding files and folders in operating systems. Computer manufacturers and administrators hide files to prevent users from accidentally deleting or damaging system-related files and folders. Other times, your employer may hide files and folders that are essential for the smooth exchange of data with customers and business partners. In most cases, you won’t notice these files at all, even though they perform important tasks.

    However, if you still want to view and access the hidden folders and files on your Mac, you should be extremely careful to avoid damaging your operating system.

    Mac Finder: showing hidden files using keyboard shortcuts

    Keyboard shortcuts are probably the easiest way to display hidden files and folders in the Finder on a Mac. You can show hidden files by pressing the Command, Shift, and Period keys at the same time.

    Step-by-step guide

    Follow these few steps to show or hide files in the Finder:

    1. Open Macintosh HD or the folder where you want to display the hidden files in the Finder.
    2. Hold down the Command, Shift and Period keys: cmd + shift + [.]
    3. The hidden files and folders on your Mac will then appear partially transparent.
    4. You can hide the files again using the same keyboard shortcut.

    Your hidden files appear transparent on your Mac.

    Showing the hidden Library folder in the Finder

    The above keyboard shortcut for showing hidden files on a Mac works in any folder in the Finder. One exception is the Library folder, which is usually hidden. It mainly contains system files and automatically saved copies of Microsoft Office documents. Showing the Library folder is especially useful when you’re looking for old Word documents and are unable to find them. If your computer crashes before you could save your data, you should look in the Library folder. You can access this folder using the following shortcut:

    1. In the Finder, press the Option key (Alt).
    2. In the menu bar, click “Go”.
    3. Click “Library”.

    Open the Library by pressing the Option key and selecting the folder under “Go”.

    Since the Library automatically saves Microsoft Office documents as hidden files, you may see a large number of unorganized files in this folder.

    The Option key is one of the most useful and commonly used keys on a Mac. Find out more about the Option key on a Mac and learn about its functions and commands.

    Showing hidden files on a Mac using Terminal commands

    Instead of using keyboard shortcuts and the Finder, you can also use Terminal in conjunction with commands on your Mac to show hidden files and folders. Terminal is a built-in command-line interface included in the Mac operating system. You can use commands in Terminal to replace sequences of multiple steps in the Finder and perform an action. To view hidden files and folders using Terminal, proceed as follows:

    Step 1: Open Terminal

    To launch Terminal on your Mac, use the following keyboard shortcut: Cmd + Space. After pressing the Command key and the space bar, type “Terminal” in the Spotlight search field. Then double-click the search result.

    Here’s what Terminal looks like on a Mac.

    Alternatively, you can launch Terminal by double-clicking “Terminal” in the Utilities Window. You can find this option either under “Go” in the menu bar or under “Applications”, which you can select in the Dock at the bottom of the screen.

    Step 2: Entering a command to see hidden files on a Mac

    Viewing hidden files and folders on a Mac using Terminal involves entering two commands and pressing the Enter key. Type the following into Terminal:

    Type the commands into Terminal as described to see the hidden files and folders on your Mac.

    Step 3: View the hidden files on your Mac

    Now the hidden files and folders on your Mac are displayed in the Finder. As mentioned above, the files appear transparent. The folders look slightly paler than folders that are not hidden.

    Step 4: Hide the files again

    You can hide the files again by replacing “true” with “false” in the command above. The command then looks like this:

    Terminal is a helpful interface for performing basic and advanced support, repair, and maintenance tasks. Another standard tool that you can use to perform these tasks is the Mac Task Manager. It can be especially useful if you’re already familiar with the Task Manager in Windows operating systems.

    How to hide files on a Mac using Terminal

    You can use Terminal not only to show or hide the hidden folders on your Mac. You can also use it to hide specific files from nosy users who may have access to your computer. To do this, proceed as follows:

    1. Open Terminal.
    2. Type in the following code into Terminal:
    1. Drag the files or folders you want to hide into the Terminal window with the mouse. The file location is displayed in the window.
    2. Press Enter to hide the files.

    You can use these commands to hide files and folders on a Mac.

    You can use the same procedure if you want to show the hidden files and folders on your Mac as usual again. To do this, simply type “chflags nohidden” instead of “chflags hidden”.

    3 ways to be present and grow online

    Get found with your own domain. Build trust with your own email address. Reach visitors with your own website.

    Viewing hidden files on a Mac using file managers

    Third-party file managers like Forklift offer an easy way of working with hidden files and folders on a Mac. They allow you to show hidden files directly in the interface of the app, without having to use keyboard shortcuts or commands that can be somewhat daunting for less tech-savvy users.

    There are many different file managers available with a variety of features. Many of these file managers let you easily show hidden files and folders on a Mac without using the Finder. We’ll use the example of Forklift to show you how a file manager can help you view hidden files. Open the Forklift app and do the following:

    1. Click View.
    2. Select “Show Hidden files”.

    View hidden files and folders on a Mac from the Forklift menu.

    Источник

    Как отобразить скрытые файлы в macOS за 5 секунд

    Изначально операционная система Apple не позволяет пользователю видеть скрытые папки и файлы на накопителях. Сделано это для стабильной работы системы и является своеобразной защитой от начинающего пользователя.

    Доступ к срытым файлам может понадобиться для редактирования системных файлов или настроек приложений, для ручной очистки системы и в ряде других случаев.

    Вот три способа отобразить скрытые данные в macOS.

    Для любителей приложения Терминал

    Большинство настроек и системных действий на Mac можно сделать через приложение Терминал. Включение и отключение скрытых файлов и папок – не исключение.

    1. Запускаем приложение Терминал из Lounchpad или Spotlight.

    2. Вводим команду:

    defaults write com.apple.finder AppleShowAllFiles -boolean true ; killall Finder

    Finder после этого перезапустится, а скрытые файлы и папку будут видны.

    Для отключения опции следует использовать такую команду:

    defaults write com.apple.finder AppleShowAllFiles FALSE ; killall Finder

    Для любителей скриптов

    Можно создать целое приложение, которое в одно нажатие будет включать или отключать отображение скрытых файлов и папок.

    1. Запускаем приложение Редактор скриптов из Lounchpad или Spotlight.

    2. В строке меню выбираем Файл – Новый.

    3. В открывшееся окно вставляем такой код:

    set vis to do shell script “defaults read com.apple.Finder AppleShowAllFiles”

    if vis = “FALSE” then

    do shell script “defaults write com.apple.finder AppleShowAllFiles TRUE”

    do shell script “defaults write com.apple.finder AppleShowAllFiles FALSE”

    tell application “Finder” to quit

    tell application “Finder” to activate

    4. Остается выбрать пункт меню Файл – Сохранить и сохранить скрипт в виде приложения.

    Теперь его можно поместить в Док и быстро включать или отключать отображение скрытых файлов и папок в Finder.

    Самый быстрый способ

    Для тех, кто не хочет возиться с редактором скриптов или терминалом, в Apple придумали сочетание клавиш.

    Запоминаем шорткат: ⌘ + ⇧ +.

    Одно нажатие и скрытые файлы отобразятся, еще одно и они снова станут скрытыми.

    Источник

    Читайте также:  Недокументированные возможности windows клименко
  • Оцените статью