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
0answers
18 views

Process Being Killed due to low swap

I'm running a python (2.7) script on mac osx yosemite. The script is fairly computationally intensive, certainly bumping up against my machine's RAM limitations. The computer crashes and restarts ...
2
votes
0answers
22 views

Catch/diagnose user process being killed - Inexplicably logged out automatically

Context: I'm using bash in Mac OSX Yosemite. Problem: I'm executing a (python) script that I expect to use alot of resources and take a few hours to run, redirecting stdout and stderr to a log file. ...
2
votes
0answers
21 views

Content of root's home directory in OSX

What is stored in root's home directory on OSX? What happens if you delete it on accident? Heres whats in my current root home folder. OSX:~ root# ls -lash total 8 0 drwxr-x--- 5 root wheel ...
0
votes
0answers
21 views

Running Mac OS X under KVM/QEMU

Note to be removed in the future, so as to avoid confusion from answerers and mods edit: Forgot to add in the note, if anyone thinks this is the wrong stack-site to post this, please comment on why, ...
0
votes
0answers
51 views

Mac terminal user privileges [closed]

While logged in as an admin on my Mac terminal, I reset the user privileges in the terminal with export ("\U \$") or something similar, I don't remember correctly. Anyhow, I could cd back to the ...
0
votes
1answer
31 views

Sed a plist file gives a iilegal byte sequence

With a Unix Mac 10.9.5, French CA version I've read a lot of tips but if the error is gone, the plist is corrupted. the locale command gives: LANG="fr_CA" LC_COLLATE="fr_CA" LC_CTYPE="fr_CA.UTF-8" ...
2
votes
0answers
53 views

Where does BPF packet capture read its data from?

I am interested in the low-level interfacing with network packets. From what I read, tools like tcpdump and libpcap use the BPF packet filter device /dev/bpf* to read link-layer network packets (on ...
2
votes
1answer
20 views

macos - local port redirection using pfctl and syntax errors

I am running MacOS(really BSD), and I want to redirect certain traffic over an ssh tunnel using a a local forward. Seems easy enough, but I am repeatedly blocked by the ambiguous "/etc/pf.conf:29: ...
-1
votes
1answer
28 views

Transfer executable file from Linux to mac

I have a file that is sitting on my server, this file is an executable file on the server. When I just use SCP to copy it down to my desktop which is a mac i get bash - ./fig up cannot execute binary ...
1
vote
0answers
23 views

To plot 7x10 pictures for review in video

Assume you have 77777 pictures. You want to review them and their differences: have 7x10 pictures without margins to have an image viewer where the minimum browse time can be less than 1.0 s such ...
1
vote
1answer
34 views

mv to file with

I ran the following mv command, apparently by mistake using backslashes by mistake instead of slashes. mv 2015-02-02_flyer_ppces.pdf ..\PPCES2015\2015-02-02_flyer_ppces.pdf The output is empty. ...
3
votes
3answers
54 views

Is swapping enabled by default on common operating systems?

As a result of this question, I was a bit confused. After some research I found that swapping is enabled by default on Mac OS X. Swapping was furthermore introduced in Windows 3.0, so I believe it is ...
2
votes
2answers
41 views

SED on Mac OS X

I'm using a MacBook Pro and I want to find and replace a given word with another with sed command, but it makes no changes. What is the problem? sed 's/\<cat\>/dog/g' tt.txt
1
vote
0answers
29 views

OS X: Apply inheritable ACL permissions to pre-existing subfolders and files

I have a folder with numerous ACL permissions set. Most of these include file_inherit and directory_inherit permissions and therefore should be, and are, automatically propagated to any new ...
1
vote
0answers
22 views

Non-deterministic errors when using nested sshfs

The OSX implementation of sshfs doesn't like to connect to my Android phone running SSHDroid, so I'm attempting to gain access by mounting an ubuntu VM via sshfs which in turn has a mountpoint to the ...
0
votes
0answers
24 views

Sharing folders between VMWare 7.1.1 and Mac OS X using open-vm-tools

I didn't have any luck sharing my OS X 'Downloads' folder with a Fedora guest Linux OS using the VMWare tools (see my earlier question) . I came across this solution (with 8 up-votes) for Ubuntu that ...
0
votes
0answers
41 views

Cannot share folders betwen Mac OS X based VMWare 7.1.1 and Guest Fedora 21 system

I would like to share my Mac OSX 'Downloads' folder. I set this up as a shared folder in vmware settings. Currently, although I made a folder at mnt/hgfs/Downloads, it does not have the contents of ...
0
votes
1answer
23 views

Multi line substitution duplicating across lines in OSX

I'm a little rusty in my sed and haven't used it much since moving to a Mac but I am aware there seems to be a difference with what sed is used on a Mac per Ubuntu after a few searches. What I am ...
-1
votes
0answers
8 views

changing partition on a dual boot

I attempted to change the partition table in my dual boot (mint/osx). OSX occupies too much space and I wanted to reallocate freed up space into mint's \home. In gpartition it seems as though I cannot ...
0
votes
0answers
18 views

OS X USB installer utilities, cannot ssh any host

I booted my mac from a OS X USB key installer. I cannot boot it from the internal HD because OS is damaged. I want to copy some files from my Mac to another computer with scp. The problem is that ...
0
votes
1answer
57 views

Increasing `ulimit -u` settings temporarily in OSX Yosemite

I'm trying to temporarily (without restarting the machine, just for test that starts a JVM) increase the number of processes to 2048 in OSX Yosemite but I'm unable to do so. First, I tried calling ...
1
vote
0answers
50 views

How to convert the qemu parameters for an osx guest for libvirtd

I managed to have an osx guest running in qemu with the following commands: // create the virtual image $ qemu-img create -f qcow2 mac_hdd.img 35G // .. install osx ... // start the guest $ ...
0
votes
0answers
39 views

How to create multi-bootable OS from USB drive in Mac OS X

While Googling and tried with some instruction from many website introduction including Youtube and also been get through this article http://apple.stackexchange.com/q/130221/116741 but still can't do ...
0
votes
1answer
35 views

Error with sed on MAC OS X invalid command u

Im french sorry in advance for my bad english... So i have an error on MAC OS X when im using sed sed -i '' '/user_pref("mail.identity.id1.reply_on_top", 1);/ a\ ...
0
votes
0answers
35 views

How do I start dnsmasq?

I have installed dnsmasq but I can't start it: $ dnsmasq dnsmasq: failed to create listening socket for 10.0.1.57: Permission denied $ sudo dnsmasq dnsmasq: failed to create listening socket for ...
3
votes
1answer
52 views

Edit a file via a script yet maintain the osx tags

On OSX you can have tags which allows you to identify different categories of files. Here are two text files with different tags when viewed in Finder: I have a large number of these files and have ...
0
votes
1answer
28 views

Mounting smb shares on OS X accessible with Microsoft account

I have a Windows machine which shares a particular directory and only an owner of this directory is able to access it over the network. Owner account is linked to Microsoft account. I am trying to ...
1
vote
2answers
50 views

How do I find folders containing no recently modified files?

I have a directory that gets a lot of data dumped into it, and I want to find all directories whose contents haven't been modified recently (e.g., in the last 5 days). I'm trying to compose a call to ...
0
votes
0answers
79 views

Dual Booting Macbook pro mid-2009 with Ubuntu and OS X Yosemite

Machine - Macbook Pro 15" Mid-2009 Hi, I am trying to triple boot my system with: 1. OS X Yosemite. 2. Ubuntu 14.04 LTS 3. Windows 8.1 For now I am trying to install linux first and then I plan to ...
2
votes
1answer
34 views

What's the easiest way to detect what signals are being sent to a process?

I'm trying to debug an issue with my shell (specifically, fish) sending signals to my background processes. I'd like to be able to recognize what signals a process is receiving. Ideally, I'd like ...
0
votes
1answer
79 views

Why convert .GIF to .MP4 file using by ffmpeg on Mac OSX got .MPEG4?

ffmpeg -i original.gif -r 10 outfile.mp4 According to command above, I've got outfile.mp4 but when clicked to see the information of file, i see it's actually a .MPEG4 file and the icon of file is ...
2
votes
1answer
40 views

Replacing by tab character in Sed in Osx

I am working in Mac OS X,I have tried several commands in sed to replace by a tab character followed by a file name. for f in *.txt; do sed -i '' -e "s/$/\t$f/g" $f; done for f in *.txt; do sed -i ...
12
votes
3answers
457 views

No colored output in less for the ls command

If I run ls I get colored output which I find pretty handy for quickly getting a glance of the kind of file. When I try to pipe it to less even with the -r and -R flags the coloring always get lost. I ...
3
votes
2answers
77 views

How can I test if my /tmp “works”?

I had to delete some files and whatever, long story, I ran sudo rm -rf /tmp/. Now, on mac (might be universal, I'm not sure) it is a symlink to /private/tmp/. But my /tmp/ folder has a thumbnail ...
0
votes
2answers
47 views

Maintaining the Current Style of the Command Prompt After Using 'su?'

When I use the su command in OS X's Terminal — say, to quickly switch to an administrator account to mount a drive using diskutil — the style of the command prompt changes. ...
0
votes
2answers
133 views

Shell script for ssh into a Unix/Linux server from MacOS X 10.10

I am attempting to ssh into a server by using a bash script from MacOSX. #!/bin/bash spawn ssh username@gatewayserver expect "password" send "Mypassword\r" interact spawn ssh ...
0
votes
1answer
45 views

How to turn on tab completion in zsh/prezto?

I have installed prezto and trying out zsh. However tab completion is not on by default. What is the best way to enable tab completion in prezto?
1
vote
0answers
23 views

need help with vf project in fish shell

Hi I am using virtual fish on fish shell, so while trying to do vf project projectName it throws the below error: vf project pytube fish: Unknown command 'virtualenv' ...
1
vote
0answers
31 views

OS X Yosemite is SUS - Single Unix Specification 3 certified. But what posix standard is it compliant to? the latest one is 2008

I'm confused. Is SUS compliance the same as POSIX compliance? Is yosemite compliant to the latest standards, what years exactly?
0
votes
2answers
227 views

Convert input string to date in shell script

My shell script: #!/bin/bash echo "$1"; startd=$(date -d "$1" +"%Y%m%d"); echo "$startd"; My command: sudo ./test.sh "20151010" The output: 20151010 20150213 it printed todays date ...
1
vote
0answers
48 views

Ubuntu Grub recognises MacOS but cannot boot up

I tried a little experiment on installing MacOS on a non Mac Hardware Laptop... Got this far as to put the MacOS Install ISO on to an HFS+ partition but the machine needs to boot this up for the ...
1
vote
2answers
73 views

How can I invoke vi instead of vim [duplicate]

I want to use vi for better pasting. When I use vi I get vim When I type /usr/bin/vi I still get vim This is on my Max OSX 10.10 Yosemite
0
votes
1answer
343 views

Running Java classes in a package --> Error: Could not find or load main class

I'm learning how to compile and run java classes in terminal using the commands javac and java. I have no problem compiling and running an individual class, however, when I put that class into a ...
0
votes
0answers
21 views

Folder keeps vanishing/showing up in finder, terminal says it doesn't exist

Upon a standard find routine I noticed a folder kept returning errors, even tough it didn't contain any of the arguments in the search query. Ilha-VB2-leo:FESTIVAIS_01-16 ilhavb2$ find . -iname ...
2
votes
1answer
66 views

How do I restart tor?

I have been trying to restart tor (for the sole purpose of changing my IP address). So what I did was make an alias to pkill -x tor; tor. But that gives me the usual tor is already in use/the ip ...
3
votes
3answers
55 views

Run fgrep multicore mac os x

I'm running this command on my Mac OS X on 8 cores: for i in $(cat file1);do grep "$i" file2; done > output.txt My file2 is 9 million lines so it takes a lot of time. Is it possible to use all ...
2
votes
2answers
75 views

Custom bash 'context' when running from FISH

First of all, I'm on OSX10. My default shell is BASH, which I have set up (through .profile and .bashrc) to automatically run the FISH shell when I open my terminal emulator. This allows me to set up ...
1
vote
1answer
19 views

Failure to update Homebrew

So I'm trying to update my home brew version but I get an error. Here is a copy pasted part from the console: $ brew update error: Your local changes to the following files would be overwritten by ...
9
votes
4answers
612 views

Use #!/bin/sh or #!/bin/bash for Ubuntu-OSX compatibility and ease of use & POSIX

I know that I can use either as the first line of scripts to invoke the desired shell. Would #!/bin/sh be recommended if compatibility with all unix systems is an absolute requirement? In my case ...
1
vote
1answer
24 views

Importing Python files from inside folders

On Mac OS X, I can import a .py file named test inside the directory dir by running import dir.test However, on Debian (specifically Raspian) this does not work. What is the alternative?