Skip to main content

Questions tagged [macos]

macOS (formerly known as OS X or Mac OS X) is the desktop operating system from Apple, found on Macintosh computers. Use this tag only if your question relates to using macOS APIs or macOS-specific behavior, not because you happen to run your code on macOS. Questions relating to using or troubleshooting macOS are off-topic and belong in the Ask Different community instead.

Filter by
Sorted by
Tagged with
267 votes
10 answers
114k views

`date` command on OS X doesn't have ISO 8601 `-I` option?

In a Bash script, I want to print the current datetime in ISO 8601 format (preferably UTC), and it seems that this should be as simple as date -I: http://ss64.com/bash/date.html But this doesn't ...
Aseem Kishore's user avatar
264 votes
27 answers
587k views

Setting the MySQL root user password on OS X

I just installed MySQL on Mac OS X. The next step was setting the root user password, so I did this next: Launch the terminal app to access the Unix command line. Under the Unix prompt I executed ...
madaura's user avatar
  • 2,641
263 votes
16 answers
198k views

Mac zip compress without __MACOSX folder?

When I compress files with the built in zip compressor in Mac OSX, it causes an extra folder titled "__MACOSX" to be created in the extracted zip. Can I adjust my settings to keep this ...
Scott B's user avatar
  • 39.7k
263 votes
15 answers
549k views

Setting PATH environment variable in OSX permanently

I have read several answers on how to set environment variables on OSX permanently. First, I tried this, How to permanently set $PATH on Linux/Unix but I had an error message saying no such file and ...
patti_jane's user avatar
  • 3,663
262 votes
20 answers
162k views

Getting the difference between two Dates (months/days/hours/minutes/seconds) in Swift

I am trying to get the difference between the current date as NSDate() and a date from a PHP time(); call for example: NSDate(timeIntervalSinceReferenceDate: 1417147270). How do I go about getting the ...
uhfocuz's user avatar
  • 3,160
262 votes
27 answers
124k views

lose vim colorscheme in tmux mode

I'm running iterm2 and when I'm in tmux mode the colorscheme I have set in vim does not show up. Only the color scheme I've set in iterm. If I run vim from shell the colorscheme appears correct - its ...
tristen's user avatar
  • 4,685
262 votes
27 answers
362k views

node and Error: EMFILE, too many open files

For some days I have searched for a working solution to an error Error: EMFILE, too many open files It seems that many people have the same problem. The usual answer involves increasing the number ...
xaverras's user avatar
  • 2,757
260 votes
22 answers
603k views

Could not install packages due to an EnvironmentError: [Errno 13]

In my MacOS Mojave terminal I wanted to install a python package with pip. At the end it says: You are using pip version 10.0.1, however version 18.1 is available. You should consider upgrading via ...
Adler's user avatar
  • 2,743
258 votes
24 answers
353k views

How do you stop MySQL on a Mac OS install?

I installed MySQL via MacPorts. What is the command I need to stop the server (I need to test how my application behave when MySQL is dead)?
Laurie Young's user avatar
257 votes
2 answers
159k views

How can I increase the cursor speed in terminal? [closed]

How can I increase the cursor speed in terminal? I have Mac OS X by the way. It would also be interesting to know it for Linux. I don't know what I should search for in Google (or what you like).
classic_programmer's user avatar
257 votes
26 answers
394k views

Force DOM redraw/refresh on Chrome/Mac

Every once in a while, Chrome will render perfectly valid HTML/CSS incorrectly or not at all. Digging in through the DOM inspector is often enough to get it to realize the error of its ways and ...
Jason Kester's user avatar
  • 6,001
254 votes
22 answers
277k views

How can I use xargs to copy files that have spaces and quotes in their names?

I'm trying to copy a bunch of files below a directory and a number of the files have spaces and single-quotes in their names. When I try to string together find and grep with xargs, I get the ...
Drew Stephens's user avatar
252 votes
11 answers
65k views

MobileDevice.pkg untrusted, cannot open Xcode after OS X update

After an automatic update of macOS v10.15 (Catalina), I am unable to open Xcode. Xcode prompts me to install additional components but the installation fails because of MobileDevice.pkg (Applications/...
eja08's user avatar
  • 4,800
252 votes
18 answers
174k views

How can I set my default shell on a Mac, e.g. to Fish? [closed]

I do not like to retype fish every time I start terminal. I want Fish on by default. How can I set the Fish shell as my default shell on a Mac?
Léo Léopold Hertz 준영's user avatar
251 votes
26 answers
123k views

Broken references in Virtualenvs

I recently installed a bunch of dotfiles on my Mac along with some other applications (I changed to iTerm instead of Terminal, and Sublime as my default text editor) but ever since, all my virtual ...
oxtay's user avatar
  • 4,000
248 votes
19 answers
505k views

Why does cURL return error "(23) Failed writing body"?

It works ok as a single tool: curl "someURL" curl -o - "someURL" but it doesn't work in a pipeline: curl "someURL" | tr -d '\n' curl -o - "someURL" | tr -d '\n' it returns: (23) Failed writing ...
static's user avatar
  • 8,286
247 votes
21 answers
158k views

(Mac) -bash: __git_ps1: command not found

I'm trying to change my command promt in terminal. I keep getting the error: -bash: __git_ps1: command not found I've tried it just by typing it into the terminal as is: __git_ps1. I've also tried it ...
Geoff's user avatar
  • 3,574
246 votes
14 answers
100k views

error while build iOS app in Xcode : Sandbox: rsync.samba (13105) deny(1) file-write-create, Flutter failed to write to a file

while building iOS app on Xcode I got these 2 errors, I tried to build the iOS on visual studio code and I got the same errors. the operating system macOS 14.0 beta. processor M1 Pro Could ...
Gamal A's user avatar
  • 2,473
244 votes
25 answers
110k views

Cannot install Lxml on Mac OS X 10.9

I want to install Lxml so I can then install Scrapy. When I updated my Mac today it wouldn't let me reinstall lxml, I get the following error: In file included from src/lxml/lxml.etree.c:314: /private/...
David O'Regan's user avatar
244 votes
4 answers
144k views

What is the difference between MacVim and regular Vim? [closed]

I'm reasonably new to OS X, but I'm familiar with Vim from using it in various *nix systems. I've seen many people recommend running MacVim over Vim in the terminal. Can anyone tell me what ...
Mark Costello's user avatar
244 votes
9 answers
354k views

Testing web application on Mac/Safari when I don't own a Mac [closed]

Having been caught out recently when a web site I launched displayed perfectly on IE, Firefox, Chrome and Safari on Windows but was corrupted when viewed using Safari on the Mac (by a potential ...
SimonF's user avatar
  • 2,685
242 votes
24 answers
124k views

Focus-follows-mouse (plus auto-raise) on Mac OS X

(I don't want to hear about how crazy I am to want that! :) Focus-follows-mouse is also known as point-to-focus, pointer focus, and (in some implementations) sloppy focus. [Add other terms that will ...
241 votes
25 answers
109k views

Easy way to see saved NSUserDefaults?

Is there a way to see what's been saved to NSUserDefaults directly? I'd like to see if my data saved correctly.
Ethan's user avatar
  • 5,749
241 votes
5 answers
237k views

Install / upgrade gradle on Mac OS X

How do I install/upgrade gradle for Mac?
mllm's user avatar
  • 17.2k
240 votes
16 answers
629k views

How to start MySQL server from command line on Mac OS Lion?

I installed mySQL on my Mac. Beside starting the SQL server with mySQL.prefPane tool installed in System Preferences, I want to know the instructions to start from command-line. I do as follows: After ...
vietstone's user avatar
  • 8,964
240 votes
16 answers
361k views

M1 docker preview and keycloak 'image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8)' Issue

I just downloaded Docker Preview v3.1 https://docs.docker.com/docker-for-mac/apple-m1/ and tried running keycloak. Anyone else running into this issue? docker run -p 8080:8080 -e KEYCLOAK_USER=admin -...
Etep's user avatar
  • 3,301
240 votes
16 answers
130k views

How to send data to local clipboard from a remote SSH session

Most Unix-like systems have a command that will let you pipe/redirect output to the local clipboard/pasteboard, and retrieve from same. On OS X, these commands are pbcopy, pbpaste Is there a way to ...
Alana Storm's user avatar
239 votes
13 answers
138k views

Where is /var/lib/docker on Mac/OS X

I´m looking for the folder /var/lib/docker on my Mac after installing docker for Mac. With docker info I get Containers: 5 ... Server Version: 1.12.0-rc4 Storage Driver: aufs ...
christian's user avatar
  • 9,970
239 votes
5 answers
42k views

What kind of leaks does automatic reference counting in Objective-C not prevent or minimize?

In the Mac and iOS platforms, memory leaks are often caused by unreleased pointers. Traditionally, it has always been of utmost importance to check your allocs, copies and retains to make sure each ...
BoltClock's user avatar
  • 716k
238 votes
16 answers
143k views

Finding current executable's path without /proc/self/exe

It seems to me that Linux has it easy with /proc/self/exe. But I'd like to know if there is a convenient way to find the current application's directory in C/C++ with cross-platform interfaces. I've ...
Uros Dimitrijevic's user avatar
237 votes
15 answers
137k views

"ERROR:root:code for hash md5 was not found" when using any hg mercurial commands

When trying to use any hg Mercurial commands on the console, I keep getting this error. I installed Python using Homebrew and I am running Mac OS Catalina v. 10.15.1. Any reference would be ...
poca's user avatar
  • 3,688
237 votes
18 answers
515k views

How can I fix the "zsh: command not found: python" error? (macOS Monterey 12.3, Python 3.10, Atom IDE, and atom-python-run 0.9.7)

Since I got the macOS v12.3 (Monterey) update (not sure it's related though), I have been getting this error when I try to run my Python code in the terminal: I am using Python 3.10.3, Atom IDE, and ...
Kirill Ignatyev's user avatar
237 votes
34 answers
459k views

Location of my.cnf file on macOS

I'm trying to follow along this tutorial to enable remote access to MySQL. The problem is, where should my.cnf file be located? I'm using Mac OS X Lion.
nicolas's user avatar
  • 2,630
237 votes
10 answers
188k views

How do you see the entire command history in interactive Python?

I'm working on the default python interpreter on Mac OS X, and I Cmd+K (cleared) my earlier commands. I can go through them one by one using the arrow keys. But is there an option like the --history ...
Lavanya's user avatar
  • 2,968
237 votes
10 answers
155k views

What is the recommended way to install Node.js, nvm and npm on MacOS X?

I am trying to use Homebrew as much as possible. What's the recommended way to install Node.js, nvm and npm on MacOS X?
ohho's user avatar
  • 51.6k
236 votes
28 answers
143k views

How to copy a selection to the OS X clipboard

I have an area selected in Vim. How can I copy it into the OS X clipboard? (The OS X clipboard can be written to via a pipe to /usr/bin/pbcopy)
ʞɔıu's user avatar
  • 48.1k
236 votes
7 answers
79k views

Linux equivalent of the Mac OS X "open" command [closed]

I've found the "open" command in Mac OS X very handy in the command line. From "man open": The open command opens a file (or a directory or URL), just as if you had double-clicked the file's ...
user avatar
234 votes
7 answers
185k views

Installing R on Mac - Warning messages: Setting LC_CTYPE failed, using "C"

I would like install R on my laptop Mac OS X version 10.7.3 I downloaded the last version and I double click on it and it was installed, when i start up I get the following error, I searched in ...
user avatar
234 votes
15 answers
121k views

How do I create a nice-looking DMG for Mac OS X using command-line tools?

I need to create a nice installer for a Mac application. I want it to be a disk image (DMG), with a predefined size, layout and background image. I need to do this programmatically in a script, to be ...
231 votes
9 answers
245k views

Why am I getting "Permission denied" when activating a venv?

I just started a new python project and created a venv inside the project folder by running virtualenv venv in the terminal. However, when I run venv/bin/activate I get a permission denied error. I ...
user3088202's user avatar
  • 3,024
230 votes
6 answers
215k views

Delete .DS_STORE files in current folder and all subfolders from command line on Mac [duplicate]

I understand I can use find . -name ".DS_Store" to find all the .DS_Store files in the current folder and all subfolders. But how could I delete them from command line simultaneously? I found it's ...
SixSigma's user avatar
  • 3,060
230 votes
16 answers
275k views

How do you uninstall MySQL from Mac OS X?

I accidentally installed the PowerPC version of MySQL on my Intel Mac in Snow Leopard, and it installed without a problem but of course doesn't run properly. I just didn't pay enough attention. Now ...
Joseph Ravenwolfe's user avatar
228 votes
23 answers
480k views

Reset MySQL root password using ALTER USER statement after install on Mac

I recently installed MySQL and it seems I have to reset the password after install. It won't let me do anything else. Now I already reset the password the usual way: update user set password = ...
dengar81's user avatar
  • 2,505
228 votes
5 answers
324k views

How to easily install and uninstall docker on MacOs

My question is How to easily install docker to have it available in terminal and how to uninstall docker on osx?
Kamil Kiełczewski's user avatar
224 votes
9 answers
188k views

Where can I find "make" program for Mac OS X Lion?

Just upgraded my computer to Mac OS X Lion and went to terminal and typed "make" but it says: -bash: make: command not found Where did the "make" command go?
Roman Kagan's user avatar
  • 10.6k
224 votes
22 answers
204k views

How to remove all subviews of a view in Swift?

I'm looking for a simple method to remove at once all subviews from a superview instead of removing them one by one. //I'm trying something like this, but is not working let theSubviews : Array = ...
Alberto's user avatar
  • 4,252
224 votes
22 answers
974k views

How to change default Python version?

I have installed Python 3.2 on my Mac. After I run /Applications/Python 3.2/Update Shell Profile.command, it's confusing that when I type python -V in Terminal, it says Python 2.6.1 which is not what ...
Zhu Shengqi's user avatar
  • 3,752
224 votes
14 answers
510k views

How to uninstall Anaconda completely from macOS

How can I completely uninstall Anaconda from MacOS Sierra and revert back to the original Python? I have tried using conda-clean -yes but that doesn't work. I also remove the stuff in ~/.bash_profile ...
Jordan Baron's user avatar
  • 3,992
222 votes
16 answers
105k views

Making iTerm to translate 'meta-key' in the same way as in other OSes

In bash shell with emacs key-binding, you can use key combination like M-f, M-b to move one word forward or backward on the shell prompt respectively. Usually, the meta key is mapped to Alt key on ...
ejel's user avatar
  • 4,215
222 votes
2 answers
44k views

Warning the user/local/mysql/data directory is not owned by the mysql user

I can't start the mysql service in Snow Leopard, and in the panel prefs appears the message, warning the user/local/mysql/data directory is not owned by the mysql user How can I fix this?
Kronos's user avatar
  • 7,541