Skip to content
- Open a terminal window (Applications/Utilities/Terminal)
- Change the current folder to the target folder (myfolder)
- If you want to create the target file (myfile)
- Type: sudo touch myfile
- Authenticate with the admin password
- If the folder is hidden in Finder, show hidden files in Finder
- Find and enter myfolder in Finder
- Drag and drop myfile from myfolder to the Desktop
- Edit myfile from the Desktop with any editor
- Save the file to the Desktop
- Drag and drop myfile from the Desktop to myfolder
- When asked, choose Replace
- Authenticate with the admin password
Related