Questions about the command line and other Unix-like aspects of Mac OS X, including the Mach/BSD-based kernel and FreeBSD-based userland. You may want to consider using Ask Different instead.

learn more… | top users | synonyms (1)

2
votes
0answers
47 views

readline - use of modifiers other than control and meta

I'm trying to use Apple's ⌘ command and ⌥ option keys to map some functions in readline to no avail. As per the man page I used octal values but that doesn't seem to work \xHH the eight-bit ...
1
vote
0answers
21 views

What does UniqueID do on Mac OS X?

Scripts to create a new user on OSX typically use the command dscl to set a user attribute UniqueID. What does UniqueID do and how should I determine what to set it to?
1
vote
1answer
435 views

Error when exporting the result of a valid command as a bash variable

I'm trying to export the result of a command line as en environment variable. Here is how I'm doing it: group_id=$(aws ec2 describe-security-groups --filters Name=group-name,Values=${group_name} \ |...
1
vote
1answer
89 views

Checking Macbook Pro Retina SSD life

I am trying to assess the health of my SSD drive (of a MBPr 15" mid-2014). I tried to do smartctl -a disk0, which gave the following output: SMART Attributes Data Structure revision number: 40 Vendor ...
1
vote
0answers
19 views

Can I specify partition in “reboot” or any similar commands?

I like to make scripts for everything that takes a bit of time, and when I have to reboot to another partition, I press the reboot button and then hold alt (⌥) and then I have to choose partition. I'd ...
0
votes
0answers
117 views

Linux Mint partition doesn't appear in Disk Util (El Capitan).

i have two problems here! I'm pretty new to dual booting on OS X, I'm trying to dual boot with Linux Mint. I've gone through all the recommended route of dual booting. I started with mounting the ...
0
votes
1answer
57 views

Can't boot Mac OSX 10.9 Virtual Machine (Virtual Box)

Whenever I try to run the virtual machine this error comes up: Failed to open a session for the virtual machine Mavericks. UUID {d2b7e883-8f73-41fc-9fde-11bc09a1a548} of the medium '/home/...
0
votes
0answers
18 views

Bash previous command refresh is messed up [duplicate]

I'm running on a mac with el Capitan. I'm at the command prompt, running bash. When I hit the up-arrow, sometimes it's as if it thinks that my prompt is much longer than it is? The first part of the ...
0
votes
0answers
21 views

Brew Cleanup keeps appearing in my Terminal history

When ever I open Terminal and/or open a new windows in OSX then press the up key, brew cleanup keeps appearing. I tried adding history -c to my bash profile but that did not work. I ran brew update, ...
0
votes
1answer
26 views

set up pfctl to forbid local applications accessing a specific hostname

I am an OSX user, and I want to ban some hostnames, with which some local applications may do nasty things. pfctl is the default firewall on OSX 10.11 El captain. So, how to block the specific ...
1
vote
2answers
273 views

Can't mount shared folder on Linux VM

Host machine: OS X El Capitan Virtual machine: Linux Red Hat(64-bit) through Virtual Box Goal: share folder on Mac, so when I change files on host machine, they will be changed on the virtual ...
1
vote
1answer
130 views

How can I replace a literal \n with a newline character? (on OS X) [duplicate]

I have a script which pulls something out of my shell history and saves it to a file, but if there is a newline in the history entry it gets returned to me with a literal \n instead of the newline ...
0
votes
0answers
32 views

Cannot use pcilib

I want to use lspci in command line, but it outputs pcilib: Cannot open AppleACPIPlatformExpert (add boot arg debug=0x144 & run as root) lspci: Cannot find any working access method. Then I ...
1
vote
1answer
47 views

copying and working on OSX .app files (folders) in linux

tldr; I want to run a script over an external hard drive and tar.gz every folder that ends with .app into their own archive. That is, I don't want them all in one tar.gz file, I want to create one ...
2
votes
5answers
232 views

How can I list the names of directories that contain file names matching a regex?

Given a directory X that contains several subdirectories and files, I would like to list the names of the immediate child directories of X that (directly or indirectly) contain file names matching the ...
0
votes
0answers
34 views

How can I remove Ubuntu from reFind on my Mac?

I used to have Ubuntu installed dual boot on my Mac but have removed it since. The hard disk has been repartitioned into a single Mac OS X partition. However, reFind still shows Ubuntu as one of the ...
2
votes
1answer
297 views

Cross compiling ARM static lib with GCC for Mac iOS xCode projects

I'm cross compiling ARM targeted toy example static lib for the usage in Mac iOS xCode projects. In the lib there are only 2 files atoy.c and atoy.h with simple function taking 2 int arguments and ...
4
votes
1answer
534 views

Why can wine run 64bit programs on Linux but not on Mac?

I read about a developer saying it doesn't work, "and probably never will". Why is this? The two OSes aren't that radically different, I think.
1
vote
2answers
88 views

Script usually works, but not with cron

I have a script that looks like this: #!/bin/bash D=~/brew\ update num=$(ls "$D" | cut -d ' ' -f 2 | sort -nr | head -1) num=$(( num + 1 )) script -q "$D/brew_update $num" brew update This ...
-1
votes
2answers
69 views

“Command not found” for no reason, even when it doesn't try to run a command

This is the errors I get when I try to run my script ~bin/killp: line 7: [[ menubar: command not found ~bin/killp: line 11: [[ menubar: command not found ~bin/killp: line 11:  [[: command not found ~...
0
votes
1answer
57 views

cron doesn't do anything

I tried making some crontabs, I created a file called brewupdater in my user folder, containing 0 */5 * * * ~/bin/brewupdate2. I then tried to run cron ~/brewupdater but it told me: cron: can't open ...
1
vote
1answer
126 views

Why mac os x does not set uid bit for /usr/bin/passwd

A lot of books state that examples of setuid bit usages include passwd, at etc. But in mac os x el capitan, the /usr/bin/passwd does not have the bit set. How could it change the /etc/passwd file?
1
vote
0answers
42 views

Revisiting and learning UNIX [closed]

To get back up to speed on best practices, which UNIX learning resources does the community recommend (slide decks, good videos series, interactive serious games, online virtual learning environments) ...
0
votes
1answer
1k views

Trying to connect to an SSH server on one machine and it works fine. Not on the other [closed]

~$ ssh -v raina@45.79.8.241 OpenSSH_6.9p1, LibreSSL 2.1.7 debug1: Reading configuration data /etc/ssh/ssh_config debug1: /etc/ssh/ssh_config line 21: Applying options for * debug1: /etc/ssh/ssh_config ...
1
vote
0answers
11 views

How do I make changes in winetricks permanent?

I downloaded a game powered by wineskin X11, it requires videomemory of at least 1GB winetricks works great, but each time I will have to open the dialog, modify it and run the game. Any ideas? I ...
1
vote
1answer
36 views

Scripting Question

I'm trying to write a simple shell script for OS X 10.10, to install a list of applications for new Macs we're getting in. I just want to fire off each installer one at a time to install each ...
0
votes
3answers
102 views

Ignore certain characters when comparing variables?

For example, If this is my script: if [[ $yesno == "What's going on" ]]; then Then how do I make it Ignore ', ?, , and . for example? So basically Whats going on, What's going on, What's going on? ...
0
votes
1answer
317 views

Formatting USB stick with fdisk - negative used space?

I formatted a USB drive using fdisk, and created three partitions. Everything seems to work fine, but Disk Utility is showing a negative amount of used space for all partitions: Partition | Capacity ...
0
votes
2answers
50 views

seq -w equivalent in os-x bash

I have sub-folders named 00 01 02, ... n with each foldername containing at least 2 digits. I need to access these sub-folders in os-x terminal. The command for i in $(seq -w 00 06); do echo $i; done ...
3
votes
1answer
46 views

ssh port forwarding through pseudo terminal

Here's a situation: I do all my work on a Mac. There's a certain linux server 'server01' that provides access to another linux server 'server02' via a pseudo terminal So, to ssh into '...
2
votes
0answers
44 views

Switch to a specified WiFi network via bash on a Mac

I try to connect to a specific WiFi network in a bash script on a Mac. Two things I want to achieve: Connect to the specified network. I have tried networksetup -setairportnetwork en0 [network_ID], ...
1
vote
1answer
102 views

how can I stop multiline commands from messing up my cursor position when scrolling through history?

Related: Why is my bash prompt getting bugged when I browse the history? History looks like: 1831 git remote -v 1832 gs 1833 gd 1834 gc -am 'moved apsum options etc to their own file set ...
1
vote
2answers
83 views

Unzipping file with exclamation mark from command line in bash script

I'm trying to do a simple script that unzips a zip file which has an exclamation mark in its name: #!/bin/bash UNZIP='/usr/bin/unzip' CUT="/usr/bin/cut" GREP="/usr/bin/grep" FILENAME="test" FILE="/...
1
vote
0answers
153 views

iowait monitoring in top on OSX/iMac

I'm trying to monitor the performance of a process on OSX 10 (iMac), specifically whether I/O is currently a bottleneck or not. I don't use the machine, hence I need something simple that the user can ...
2
votes
0answers
239 views

How to change to a different user after SFTP login

The goal: Use local IDE (IntelliJ PHPStorm 9) to browse & edit remote files via SSH The obstacle: My user on the remote machine does not have permissions to read files, which are owned by ...
1
vote
1answer
91 views

Debian Jessie Nvidia proprietary drivers and screen brightness buttons

How do you make Mac OS X screen brightness work when using Debian Jessie 8 and Nvidia proprietary drivers? There are a lot of answers floating around about editing the config file adding some options ...
1
vote
1answer
15 views

Changes of Terminal look don't work anymore

I got a mac laptop and have been using a home directory which is not under my name. After spending some time, I have set preferences and of course one day, I needed to change the home directory name ...
0
votes
0answers
55 views

Help Installing Debian on Mac Mini Late 2012

I have tried to install Debian Linux on my Mac Mini Late 2012. I first installed rEFIt, then I've created a USB Stick with Debian using uNetBootIn and selecting Stable_NetInstall_x64. Then I booted it ...
1
vote
0answers
38 views

Booting full Linux Mint off USB on Intel Macbook pro?

I almost never post questions online but this time I couldn't find a solution to my problem. My problem is that I'm trying to boot full Linux Mint from a USB on a Macbook Pro. I was already successful ...
2
votes
1answer
99 views

Tried to change the name of my home folder on Mac OS X and f'ed up

I'm on OS X 10.10.5 I tried to change the name of my home folder and account using the instructions here. I followed them to the "T". I made a temporary admin account to make the change from called ...
3
votes
1answer
131 views

OS X: Can `ls` show broken symlinks?

When in Linux, I enjoy having \ls -l --color=auto show broken symlinks with red text for the name of the symlink and blinking text for the missing linkee. But in OS X, \ls -lG (the closest thing I ...
2
votes
1answer
50 views

Accessing Time Capsule Drive from SSH?

I have an Apple Airport Extreme Time Capsule. I'd like to use it to store information for data mining operations. I've set up OS X server, and set up user accounts such that users can log into a Mac ...
11
votes
5answers
729 views

Test if File was Modified After Date in File Name

I have a files named with YYYYMMDD in the file name, such as file-name-20151002.txt I want to determine if this file was modified after 2015-10-02. Notes: I can do this by looking at the output ...
2
votes
1answer
157 views

UTF-8 not working over SSH

I have configured my terminal on OSX to show emoji properly. When I open up a terminal I can type and see emoji properly. My locale settings for OSX are shown below. When I start a tmux session it ...
2
votes
0answers
70 views

How to share my internet connection with a Raspberry Pi? [closed]

I connected my Raspberry Pi, that runs Arch Linux, to my Mac with an ethernet cable using this tutorial. I set the ip of the Raspberry Pi in the cmdline.txt file to 192.254.0.2. My Mac automatically ...
0
votes
1answer
277 views

How to setup Mac OS X Terminal on bash and iTerm2 on zsh

I attempted to setup bash shell by default on Mac OS X (Yosemite) Terminal app and zsh shell by default on iTerm2 app. However, it is either bash shell or zsh shell for both the apps. $ chsh -s /bin/...
0
votes
0answers
50 views

customer display on headless server / POS system / Mac OSX

I have a web based POS system running (AMP), formerly on debian, now switched to OSX due to lacking linux printer drivers. The Mac mini is running headless, no keyboard, no mouse, no (normal) monitor. ...
1
vote
0answers
16 views

Anybody ever seen a file called .x64HG0B+VC on a Mac? [closed]

I've been looking at a file called .x64HG0B+VC and was wondering what it was...anybody have an answer?
0
votes
0answers
46 views

Scripting Assistance

I'm new to scripting and was hoping someone could point me in the right direction on figuring this out, any help would be appreciated. I need to create folders and symlinks in a second set of ...
1
vote
0answers
58 views

Upgrade OSX (Macbook Pro) when it has a Debian dualboot

On my Macbook Pro, I have a Debian/OSX dualboot, the partition looks like the following on OSX: bash-3.2$ diskutil list /dev/disk0 #: TYPE NAME SIZE ...