CategoryMac OS X

How to resize a window that overflows past the screen margin

  1. Focus the target window
  2. Click Window/Zoom

How to add folders to the paths environment variable

  1. Show hidden files in Finder
  2. Find and enter the folder Macintosh HD/etc
  3. If there is not a folder called paths.d, create it
  4. In the folder paths.d create and edit the file myfile, whose content will be the absolute paths of the target folders (one line each)

How to edit a file in a protected folder

  1. Open a terminal window (Applications/Utilities/Terminal)
  2. Change the current folder to the target folder (myfolder)
  3. If you want to create the target file (myfile)
    1. Type: sudo touch myfile
    2. Authenticate with the admin password
  4. If the folder is hidden in Finder, show hidden files in Finder
  5. Find and enter myfolder in Finder
  6. Drag and drop myfile from myfolder to the Desktop
  7. Edit myfile from the Desktop with any editor
  8. Save the file to the Desktop
  9. Drag and drop myfile from the Desktop to myfolder
  10. When asked, choose Replace
  11. Authenticate with the admin password

How to access hidden files and folders in Finder

  1. (Download, install and) run the TinkerTool
  2. Select the Finder panel
  3. Among the Finder options, tick Show hidden and system files
  4. At the bottom right, click on Relaunch Finder

How to clean the quarantine flag

In a Mac, anything downloaded from the Internet, gets tagged with a security flag, the com.apple.quarantine flag. This is really useful because it later allows the user to authorize a program to run, and avoid unwanted possibly dangerous actions to be performed.

The flag is also applied to the contents of downloaded files, so when I downloaded the WordPress installation ZIP file, and extracted it to my htdocs folder, each and every WordPress file got flagged. Really no big problem, up to when I tried to edit files from within the WordPress admin panel. Not possible…

To get rid of the quarantine flag on all WordPress files at once I used these commands:

cd wordpress
xattr -r -d com.apple.quarantine ./*

 

© 2017 Notes Log

Theme by Anders NorenUp ↑