Published on

Creating a Hidden Directory Using Terminal on macOS

Authors

Creating a Hidden Directory Using Terminal

This guide walks you through creating a .attachments directory on macOS using the Terminal, ideal for organizing PNG files in an MDX project.

  1. Open Terminal:

    • Press Command + Space, type "Terminal," and hit Enter to launch the Terminal app.
  2. Navigate to Your Project Folder:

    • Use the cd command to move to your project directory. For example:
      cd ~/Documents/ilms-docs
      
    • Replace ~/Documents/ilms-docs with the path to your repository. If unsure of the path:
      • Type cd (with a space), drag the folder from Finder into Terminal, and press Enter.
  3. Create the .attachments Directory:

    • Run this command to create the folder:
      mkdir .attachments
      
  4. Verify It Exists:

    • List all files, including hidden ones, to confirm:
      ls -a
      
    • You should see .attachments in the output.
  5. Move PNG Files (Optional):

    • If your PNG files are elsewhere, move them into .attachments. For example:
      mv ~/Downloads/feature-branch-with-develop-git-workflow-1-03ac99d9-9d71-42aa-9310-59a5429c074b.png .attachments/
      
    • Replace the source path with the location of your PNGs.