Tag Info

Hot answers tagged

6

You'll either have to change the settings under System Preferences > Security & Privacy > General > Allow applications downloaded from: to Anywhere or in a Terminal, strip the xattr com.apple.quarantine attribute from the downloaded file(s). xattr -dr com.apple.quarantine "unidentified_thirdparty.app"


5

I like the alias answer. This is another route I found whilst looking. sudo ln -s /usr/local/mysql/support-files/mysql.server /usr/local/sbin/ can now stop and start with sudo mysql.server start sudo mysql.server stop


5

From the shutdown man page: Upon shutdown, all running processes are sent a SIGTERM followed by a SIGKILL. The SIGKILL will follow the SIGTERM by an intentionally inde- terminate period of time. Programs are expected to take only enough time to flush all dirty data and exit. Developers are encouraged to file a bug with the OS vendor, should they ...


4

Just create an alias in your ~/.bash_profile or ~/.profile file. Check with ls -la0 ~/ if one of the files already exist, else create one with: touch ~/.bash_profile After opening .bash_profile with nano ~/.bash_profile add the lines: alias iwanttostartmysqlwithareallyshortcommand='sudo /usr/local/mysql/support-files/mysql.server start' alias ...


3

fwiw, find [options] -print0, when used in conjunction with (piped to) xargs -0 [options], handles filenames with spaces, without messing with for loops or IFS: find /Users ! -path '/Users/Shared*' -type f -print0 | xargs -0 -I {} \ bash -c 'if [[ "$(file -b --mime-type -- "{}")" = "application/x-mach-binary" ]]; then chmod 700 "{}" ...


2

Looks like networksetup and airport are your best bets. run ifconfig to find network interfaces, then airport scan to find available networks, and then networksetup -setairportnetwork INTERFACE SSID PASSWORD where INTERFACE, SSID, and PASSWORD are replaced by the proper items. It's not the most elegant method, but it works.


2

This is what I'm using for Yosemite: First, grab $hardwareUUID: hardwareUUID=$(/usr/sbin/system_profiler SPHardwareDataType | grep "Hardware UUID" | awk -F ": " '{print $2}') Then loop through existing users and set to "Disabled" for USER_HOME in /Users/* do USER_UID=`basename "${USER_HOME}"` if [ ! "${USER_UID}" = "Shared" ] then ...


2

-h "Human-readable" output. Use unit suffixes: Byte, Kilobyte, Megabyte, Gigabyte, Terabyte and Petabyte. If -h is not given, the sizes are given in 512-byte blocks.


2

Compass Compass shouldn't require the Command Line Developer Tools, just a compatible ruby environment. I suggest a ruby version tool instead of using the system ruby, so that you can control your ruby version/environment. I favor chruby, but any of these works well and can be installed without needing the Command Line Dev Tools: chruby rbenv RVM ...


2

You can use sed command: sed -n '4p' YOUR_FILE Or head/tail combination: head -n 4 YOUR_FILE | tail -n 1


2

It appears difficult or impossible with the built-in say command. You may be able to redirect the audio from say into a listening AUNetSend that in turn writes to disk and plays the audio; see Audio Hijack below. espeak and ffplay You can use the open source espeak and ffplay tools to achieve this. The following command both says "Hello world" and creates ...


1

I created Homebrew-command-not-found just for that. It works exactly as you would expect, and supports 4800+ Homebrew formulae. We currently support Bash and Zsh, and there’s an open pull-request for Fish support. However it’s currently limited to correct spellings, e.g.: $ ghc The program 'ghc' is currently not installed. You can install it by typing: ...


1

find can handle spaces in file names. Your for loops are causing the problems. You can put your logic in multiple find commands. Not every directory in a user's home folder should be accessible to only them self. Public and Sites come to mind. You can fix them separately in another find command. find /Users/* ! -path '/Users/Shared*' -type d ! \( -name ...


1

As far as I know, you can't do it using open command. But, you can do it using a combination of keyboard shortcuts and Terminal profiles. Define a new profile on your Terminal app (let's call it ssh) and add your ssh command on Shell tab under Run command:. Then your can define a shortcut on System Preferences - Keyboard - Shorcuts - App Shortcuts like ...


1

This seems to work for XCode 5, remove --dry-run to actually perform copy. sudo rsync -ai --exclude subversion\* --exclude SVN\* /Applications/Xcode.app/Contents/Developer/usr / sudo ln -sf /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild /usr/bin/ Or go to https://developer.apple.com/downloads/ and search for "xcode" - there are downloadable ...


1

mtklr's (and Patrix') solution will work, but I find it's simpler to use a while read loop when dealing with a file list from find ... -print0: find /Users '!' -path '/Users/Shared*' -type f -print0 | while IFS= read -d '' -r file; do if file "$file" | grep -iq ": .*executable"; then chmod 700 "$file" else chmod ...


1

I would comment, but I don't have enough coinage. We need to figure out what is wrong: The packages do not exist in a known path that you have. We know this. So what is causing it? Either it's not being installed, or it is being installed and the binary is not in PATH. First, make sure it is being installed properly by pip. Do a pip install and let us ...


1

I was able to resolve the issue by changing IFS to IFS=$(echo -en "\n\b") and not quoting the filename. IFS is Internal Field Separator, it is used (among others) for word splitting after shell expansions, and it includes a space by default. I found the IFS trick at nixCraft's BASH Shell: For Loop File Names With Spaces. $ cat fix-perms.sh #!/bin/bash ...



Only top voted, non community-wiki answers of a minimum length are eligible