Skip to content

Hidden Files

You'll see .DS_Store files everywhere. These are Finder metadata files that store:

  • Icon positions
  • View settings (list, icon, column)
  • Folder-specific display preferences

They're harmless but annoying in git repos. Add to your global .gitignore:

bash
echo ".DS_Store" >> ~/.gitignore_global
git config --global core.excludesfile ~/.gitignore_global

Hidden Files

macOS hides files starting with . (dotfiles) by default.

Toggle Hidden Files in Finder

Press Cmd + Shift + . (period): toggles visibility on and off.

Common Hidden Files

FilePurpose
.zshrcShell configuration (like .bashrc)
.gitignoreGit ignore rules
.ssh/SSH keys
.config/App configs (XDG standard)
.Trash/Your Trash folder

Permissions

macOS uses Unix permissions (same as Linux). The basics:

bash
ls -la ~/Documents/
# drwxr-xr-x  5 yourname  staff  160 Mar 30 10:00 projects
# -rw-r--r--  1 yourname  staff  4096 Mar 30 09:00 notes.txt
SymbolMeaning
dDirectory
rRead
wWrite
xExecute (or enter, for directories)

Fixing Permission Issues

bash
# Make a script executable
chmod +x script.sh

# Take ownership of a folder
sudo chown -R $(whoami) /path/to/folder