I'm always forgetting little things in MacOS and various other operating systems, I think it's just a sign of age starting to kick in as I used to be able to remember all this and much more, leaky brain aside I thought it would be a good idea to start noting down these little tips and tricks, mostly for myself but who knows they may help others that may not know how these things are done.. or like myself have a leaky brain!
...also I've been super short on content recently so I thought it was probably a good idea to start posting something.
dot files Hidden Files origins
Hidden files on MacOS follow the *nix methodology so they are also commonly known as dot files, any file or folder that's prefixed with a . (dot) is hidden by the system I found an article on linux-audit that covers some history of dotfiles/hidden files for those thirsty for the dot files origin story.
It's not often you will need to deep dive into finder to locate a hidden file, but for those few times you will need to; for example add a key from the .ssh folder to an app like transmit or similar it can be annoying as you will not see those previous hidden files by default and you will not find an option under View in the Apple menu! so what to do ?
Showing hidden files in Finder (MacOS)
So I put together a totally legit example below of my files within the Downloads folder:
As you can see (can you?...see him?) we have our two files but we want to get to our top secret folder so we hit
⌘ + ⇧ + .
Command + Shift + . (dot) when pressed will not show any hidden files/folders but they will look a little ghostly - this is normal and helps you quickly identify a hidden file something like below
You can of course when you are done revert the show hidden files to hide hidden files by issuing the same command in finder
⌘ + ⇧ + .
When you first add a . to a file, you will be prompted with the warning letting you know that add a . will hide the file should you confirm you wish to do this the file may not be hidden right away, relaunching finder, toggling show hidden files or navigating away and back into the folder will hide the file accordingly - the file is basically hidden as soon as you add the dot but it doesn't take effect until you do one of the above
As with most things on MacOS a terminal version also exists, you will want to of course open a terminal then issue the following command
defaults write com.apple.Finder AppleShowAllFiles
- You will then probably want to relaunch finder so issue a killall
killall Finder hit enter and you should be set
- You can of course undo this by just switching the true, to a false and relaunching finder
defaults write com.apple.Finder AppleShowAllFiles false
killall Finder of hit enter and hey presto, files gone.
Third Party File Managers
While Transmit isn't strictly a file manager, it does have a lot of file management features, so it's what I intend to use in this example where it's actually a view option to show/hide hidden files
and as you can also see it has it's own, not quite the same shortcut as it uses
⇧ + ⌘ + B (shift + command + B) so when it comes to third party apps, I think the logic is simple - check the 'View' option I n the Apple menu and/or whatever documentation is provided with the app, but for everything in finder it's all per above.