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)

0
votes
1answer
34 views

Is there a minimal POSIX shell for OS X?

Is there a minimal POSIX shell implementation for OS X? I like to write fairly portable shell scripts and want to catch as many incompatibilities or bashisms up front as I can. I'm not intending to ...
0
votes
1answer
6 views

Netatalk users can't read World/Other readable files

I'm using Netatalk to share documents with several Mac machines. Regardless of what permissions I'm using for the file (typically 775 for folders and 664 for files) they can't be read by users in the ...
2
votes
1answer
34 views

Darwin strips setuid from interpreter in hash bang execution

This is not exactly a question about how to run a hash bang script. In this situation, a hash bang script exists which doesn't (necessarily) have the u+s permission. Rather, the interpreter has u+s, ...
1
vote
1answer
32 views

how to inject keystrokes in a program like Safari from a bash script?

I am trying to automate some keypresses every few minutes. The exact timing is still undetermined. But basically I want to capture a live chat dialogue. I'm sure I could do this more elegantly. I don'...
1
vote
2answers
40 views

Regex in find - OS X

I cannot figure out what's wrong with my regex, it seems to be working with grep but now with find. I'm trying to find all the files which follow the common expression in TV shows e.g. S02E21. find -...
0
votes
2answers
34 views

How can I give files extended attributes in mac os x?

How can I give files extended attributes in mac os x? Mac os x doesn't have the 'setattr' command.
1
vote
1answer
20 views

OSX: Grammarian won't uninstall

Im trying to uninstall an annoying app on my Mac called Grammarian Pro X and the uninstaller doesn't work with my version of OSX 10.11. You can uninstall the main app but there is still bits of the ...
0
votes
1answer
21 views

Redirecting output of `man <command>` to file produces file with tons of `^H` characters on OS X [duplicate]

The following behavior occurs in OS X (10.9.5) with the BSD utils, but not Linux (Ubuntu 15.10) with the GNU utils. OS X: $ man -v man, version 1.6c Linux: $ man --version man 2.7.4 I'm ...
2
votes
0answers
46 views

Schedule on boot persistent reverse SSH tunnel on Mac OSX

In attempts to run a self sustaining reverse ssh tunnel I have tried installing the 'autossh' package with brew. Autossh works alone when ran through the user's prompt, but not with launchctl/launchd. ...
2
votes
4answers
59 views

How to know which ports are listened by certain PID?

I have a PID of certain process listening some port(s) on my OS X and I need to know which port(s) is listened by this process. How can I do it? I know I can use lsof to know which process is ...
2
votes
1answer
45 views

Feasibility of open source OS that is binary compatible with OS X?

Could this be achieved? It would have to be done legally, without infringing on Apple's copyrights. Could it be built on a Darwin, FreeBSD or other base and then aim for binary compatibility with OS ...
1
vote
0answers
41 views

Is compatibility technically easier to achieve for Darling than for Wine?

I hope this question isn't too theoretical. I find it very interesting. A project called Darling is attempting to create an OS X compatibility layer for Linux. If successful, this will allow users to ...
0
votes
1answer
19 views

How can I tell if GNU GSL is installed?

How can I find out if GNU Scientific Library is installed? OSX 10.11
0
votes
1answer
82 views

Find not working

The find command is not working as expected on my OSX with oh-my-zsh. A few examples: $ find . -name test find: .: Invalid argument $ find usage: find [-H | -L | -P] [-EXdsx] [-f path] path ... [...
2
votes
2answers
73 views

What is the best way to setup 3 HDDs with 3 OS on one computer?

I am building a new PC, I am a developer of whatever people want me to make, but I personally like to code games. To do this, I have a simple set of requirements: Machine must run Windows 7, to run ...
0
votes
0answers
14 views

Stop Ubuntu on Macbook from booting into OS X from external drive

I have Ubuntu (Lubuntu) installed on a MacBook which has two external hard drives connected to it. One of the partitions on one of those drives is a bootable backup of an OS X machine. When I reboot ...
0
votes
0answers
12 views

pcfl - Allow ssh for an specific IP

I'm working with pfctl on Mac OS X. Im trying to make a policy/anchor what blocks SSH for ALL ips, minus specific ip. I try this: pass in on fxp0 proto tcp from any to any port < 22 flags S/SA ...
1
vote
1answer
61 views

Access manpage(2) on OS X

In Mac OS X, at the end of the chmod man page, it shows See also: chmod(2) But when I enter man chmod(2) It says that there is no such man page. How can I access the man page chmod(2) man page? ...
1
vote
0answers
42 views

Linphone (3.9.1) compiling error with ./prepare.py --package in OS X El Capitan (10.11.4)

I'm a noob with the linphone project. I had clone the linphone-desktop project and follow all the steps provided both on the README and in the README.macos from the linphone repository to install all ...
0
votes
1answer
53 views

List hidden files only (not just dot files) using an ls alias

I would like to use an ls alias (like l.) to output a colored list, consisting of only hidden files & directories, whether or not they begin with a dot. Any suggestions? Example of desired ...
1
vote
0answers
43 views

ncurses over ssh (osx -> linux) freezing and unresponsive

I'm using linux perf_events and sometimes am having trouble with the perf report (which is an ncurses terminal application) view freezing up. I'm interacting with a remote linux server which is ...
0
votes
2answers
47 views

Command to merge all terminal windows?

Is there a terminal command that merges all open terminal windows into one window with tabs? Been searching all over the place, but have yet to find any solutions.
4
votes
1answer
104 views

Error on enabled probe: syscall::open_nocancel:entry): invalid user access in action #2 at DIF

I've the following one-liner to show files opened by process: sudo dtrace -n 'syscall::open*:entry { printf("%s %s",execname,copyinstr(arg0)); }' however I've plenty of repeated errors such as: ...
1
vote
1answer
32 views

Substitute with `…` multiline output of find command [duplicate]

I need to substitute output of find command to another command to process every found file, e.g.: mdls `find ~/target_dir/ -iname '*some*' -depth 1` (mdls is a command in OS X which get metadata ...
0
votes
0answers
39 views

Terminator installed via Homebrew “Incompatible library version”

I've installed Terminator from the homebrew/gui tap, but when I ran it, it raised this error: You need to install the python bindings for gobject, gtk and pango to run Terminator. I edited /usr/...
0
votes
0answers
39 views

Corrupted netatalk time machine drive

I wasn't sure, whether it fits this section. If not, please let me know by commenting and I will move it to other, more suitable section. My home nas, which is running debian jessie, is configured to ...
1
vote
1answer
74 views

What are these processes and why can't I kill them?

(On OS X 10.11.3) I'm having a problem starting a java process that needs to listen on port 8040. Getting a BindException. So seems like somebody else is already listening on it. A quick check ...
1
vote
0answers
28 views

Can I repair a HFS+ volume if the files were unreadable after “Easus Recovery Wizard” recovery? Testdisk & Diskutil info below

I have someone else's 1.5TB hard drive (WD Elements) that I would like to repair or recover files from. It has possibly been dropped and was constantly around a lot of loud Techno music. It is the ...
0
votes
1answer
88 views

How to display images in OSX terminal

How do I display images in the terminal? I am on Mac OSX mountain lion (10.8.5), and the answers in this question don't work on OSX. Is it possible at all?
1
vote
1answer
82 views

I'm trying to install ncmpcpp, but when installing boost it hangs here

The following shows what happens when I try to install ncmpcpp (on OS X): brew install ncmpcpp !181 ==> Installing dependencies for ...
0
votes
1answer
19 views

Change another user's umask on macosx

How can I change another user's umask on Mac OS X? This question only has answers that work on Linux.
3
votes
1answer
29 views

How to increment a day in a date that is stored in a variable

I am on OSX and have a date variable stored in $d which is formatted like %Y_%m_%d. So echo $d would give something like 2016_03_29. I want to increment the day by 1 so it becomes 2016_03_30. From ...
1
vote
0answers
31 views

'Resuming' Ubuntu after battery died

I'm running Ubuntu 15.10 alongside OSX, usually booting into Ubuntu using rEFInd. Last night my laptop died while in Ubuntu due to lack of battery power, when trying to boot back into Ubuntu this ...
0
votes
1answer
121 views

Split a text file into multiple files, beyond the {99} limit of csplit

I'd like to split the contents of a .txt file into multiple files, but I'm encountering two questions about limitations of csplit: (1) can anyone offer a way around csplit's maximum limit of '99' ...
2
votes
1answer
35 views

using Sed to find and replace a string inside a file [closed]

I have been trying to replace '{{date}}' with a current date stamp in OSX command line. I have been using the following: sed -i -e 's/{{date}}/`date`/g' mhp.xml Does anyone know why it ends up ...
1
vote
2answers
80 views

How do I make there be no group owner of a file in Mac OSX?

How do I make there be no group owner of a file in Mac OSX, since chgrp nogroup file doesn't work? If I try, the group owner doesn't change at all.
1
vote
2answers
78 views

How do you make filesystems in mac OSX

How do you make filesystems in OSX? Mac OSX doesn't have the mkfs command.
0
votes
1answer
77 views

how do I give users capabilities

How do I give users capabilities in OSX? I googled it and I found no answers. The setcap command doesn't exist in OSX.
2
votes
0answers
22 views

How unmounting closes file descriptors?

Checking currently open files on my /Volumes/UNTITLED gives me 2 entries: $ sudo lsof /Volumes/UNTITLED/ COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME mds 62 root 8r DIR 1,6 ...
0
votes
1answer
55 views

Running dd. Why resource is busy?

I just formatted microSD card, and would like to run a dd command. Unfortunately dd command fails: $ sudo dd bs=1m if=2016-02-26-raspbian-jessie-lite.img of=/dev/rdisk2 dd: /dev/rdisk2: Resource busy ...
0
votes
0answers
79 views

Command not found, only when used in a script

I installed pup on my mac using homebrew. When I try this command in my terminal cat index.html | pup -p 'div[class="quote"] text{}' >> quotes.txt it works fine but when I use it in a ...
1
vote
1answer
57 views

Move specific directories from certain depth

I've tried to make a bash script that will help me move specific subfolders from my folder. The issue is,in the main folder photos I have folders named like this: 1,2,3,4,5,6,7,8,9,0 and inside them ...
3
votes
1answer
51 views

“Mac-style” unzipping on linux

I'm using Linux Mint MATE edition, in case that's relevant. I don't know if this is Dropbox specific, but when i download a zip of a folder that was originally produced on a Mac (and that has lots of ...
0
votes
2answers
155 views

Removing ISO 9660 from USB using Terminal

I received a USB flash drive that contains a pre-installed ISO 9660 (Joliet) image on it. To delete the image and free up space on the drive, I attempted to use sudo rm -rf /Volumes/ISONAME via a ...
0
votes
1answer
53 views

Recursive Make passing targets in OS X

I am trying to write a recursive clean target for GNU Makefile on OS X (GNU Make 3.81 - from XCode). Following GNU Make documentation, I came up with the following: Main Makefile ALLSUBMAKES=$(...
0
votes
0answers
106 views

Can I remove “Linux/Ebury Operation Windigo” without wiping the entire drive?

I used chkrootkit, which told me that I had "Linux/Ebury Operation Windigo" installed, I doubled checked by running ssh -G which printed out usage, without "illegal option". I removed all ssh files ...
11
votes
2answers
532 views

awk memory leak?

Base on this I'm running the command < /dev/urandom hexdump -v -e '/1 "%u\n"' | awk '{ split("0,2,4,5,7,9,11,12",a,","); for (i = 0; i < 1; i+= 0.0001) printf("%08X\n", 100*sin(...
1
vote
1answer
28 views

How I can change the home directory of the sftp server on MAC OS X?

I'm trying to set up SFTP's home directory on a MAC OS X Mavericks for user my_user. Now, it looks like: /Users/my_user (i got it with sftp> pwd command) but I want it be: /Users/my_user/Documents/...
0
votes
0answers
105 views

I have: “error: no such device: 6ec8e… Entering rescue mode… grub rescue>” on Mac OsX boot

I decided to install Debian on a external HDD to try it with my Mac Book Pro and then see if I will install it on a partition of MBP's SSD. I installed it and plugged the device on the machine, but ...
1
vote
0answers
62 views

ftp: Illegal PORT command with ls on Linux, but not OS X?

I'm getting strange errors with ftp on Linux (Arch, to be more specific, as part of the inetutils package). To be truthful, the reason I'm using the shell command is because all of my other clients ...