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)

1
vote
1answer
33 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
48 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
43 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
88 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
38 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
95 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
87 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
20 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
30 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
34 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
167 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
37 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
86 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
86 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
87 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
25 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
60 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
89 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
59 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
55 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
197 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
59 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
1answer
135 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
535 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
37 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
116 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
83 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 ...
4
votes
1answer
139 views

Why does “ls” sporadically output only “.” in the root directory of an external drive?

In the root directory of my USB flash drive, sometimes when I run ls, the output is normal and it lists the files. At other times, the output is simply one line: $ ls . If I try ls -la at one of ...
4
votes
1answer
75 views

Creating a DMG file on Gentoo

I'm trying to create a Mac OS DMG image file on Gentoo - I managed to create the FS using mkfs.hfsplus and just dropping all the contents into the mounted file system, and everything works fine.. the ...
0
votes
2answers
364 views

Meaning of “l” in “lrwxr-xr-x”? [duplicate]

According to this website: http://ss64.com/bash/ls.html The first letter indicates the file type: f means file and d means directory. But in my case I've an l. What's the meaning of this l? In ...
1
vote
1answer
84 views

How can my text file get filled with ^M characters all of a sudden?

I have a text file on a Mac machine, and I've only ever used vi/vim to edit it. Today when I opened it using vi I noticed a bunch of ^M characters everywhere. The only thing I did different today was ...
0
votes
0answers
41 views

RabbitMQ/Elasticsearch too few/many files (ulimit, limit maxfiles)

This is for my local dev setup: Problem #1: RabbitMQ was running out of socket descriptors for which the recommended solution was to set ulimit -n 65536 65536 in ~/.zshrc Problem #2: ...
4
votes
1answer
55 views

OSX 'env python' returns different interpreter than 'python' [duplicate]

I cannot figure out what is going on here. I have just installed Anaconda, and I am trying to get my #! /usr/bin/env python shebang to return the new interpreter. I have no python aliases, and ~/...
1
vote
1answer
60 views

Setting Terminal tab names in OS X and using vim

I regularly ssh into a Linux cluster from an OS X (El Capitan) Terminal, sometimes with multiple Terminal tabs. I use bash and vim. I'd like to do the following: while ssh'd, set the Terminal tab ...
4
votes
2answers
146 views

OS X Postfix no TLS found

I'm working on OSX El Capitan. About week ago everything worked fine, but then I changed my gmail password and now I can't send emails any more. Additional configuration for /etc/postfix/main.cf is: ...
0
votes
2answers
242 views

What is causing the “syntax error near unexpected token `do'” and how can I fix it?

I keep getting this error: ./install.sh ./install.sh: line 28: syntax error near unexpected token `do' ./install.sh: line 28: ` do' When running this code (a work in progress): # ...
7
votes
3answers
648 views

wc command counts extra characters

cat > file Amy looked at her watch. He was late. The sun was setting but Jake didn’t care. wc file 1 16 82 file Can somebody explain why wc command returns 3 extra characters in this ...
0
votes
0answers
128 views

Installing Lakka on an old Macbook Pro

I've been trying to get a USB with Lakka.img on it to boot on a 2011 Macbook Pro for the last few days now, and I'm not getting anywhere. I've used/tried to: Copy the image to the usb via the ...
0
votes
1answer
18 views

can i use .bash_profile to create an alias which copies text from a file? [duplicate]

I have a long string of text saved in a file that I want to easily copy to clipboard using Os X 10.11 terminal
1
vote
1answer
21 views

On the relationship between shell initialization and desktop apps after a “graphic login”

I am very (zsh)/somewhat (bash) familiar with the shell's initialization sequence when the user logs in through a text interface. But what about the case of a "graphic login", IOW, when the user logs ...
0
votes
2answers
27 views

How do I open BSD System Calls Manual instead of BSD General Commands Manual?

Suppose I wish to read about wait syscall. Typing man wait would only give the manual entry for wait as in shell, not in syscall. However if I type man waitpid, I would get the manual entry for wait ...
0
votes
1answer
58 views

Type curly brackets on Debian running on mac

I have searched for this problem for a while and can not find an answer anywhere. I am currently running a Debian on virtual box on a mac. How do i type the "Alt Gr" Characters like curly brackets?
2
votes
2answers
132 views

How to switch to root and use same dotfiles as my normal user?

I run zsh on Mac OSX, and sometimes want to switch in the terminal to the root user. I'd like to keep all my dotfiles, and environment path configuration and scripts from my regular user, and just do ...
2
votes
1answer
81 views

bash shell doesn't appear when terminal is launched

Whenever I launch terminal in my Macbook Pro. The terminal doesn't show command line of bash shell. What appears is the command line of Mathematica 9.0. It has been long time after installing the ...
1
vote
1answer
94 views

How can I install Arch Linux on Mac? On an external hard drive?

How can I install Arch onto a Macbook Air 2014? I'd also like this to be on an External Hard drive. I know how to boot into the BIOS and everything, I just feel like none of the guides have helped me. ...
3
votes
0answers
52 views

Use a “Friendly” Label on Drives or Partitions in FreeBSD

Maybe I am missing this and it's really simple, but I cannot figure out how to label a BSD disk. I have looked at tunefs or gpart and even disklabel, however none do what I am looking for - I don't ...
0
votes
0answers
39 views

Set Default Boot Device for XServe in Open Firmware

I have an old Apple XServe G4 that I successfully created a dual boot of Mac OS X and FreeBSD 10.2. In order to boot the machine, you have to go into Open Firmware and issue a boot command... I ...
1
vote
2answers
142 views

Installing Linux on MacBook Air

I've wanted to switch over from OS X to Linux as my main OS for some time now, but I have a few questions that I would prefer to be answered before I try. Please excuse my general lack of knowledge ...
3
votes
1answer
68 views

Change dir colour in bash output

Under Mac OSX, I am trying to change the dir colour when ls outputs in the bash shell. So I placed this line at the end of my .bashrc file and reloaded. LS_COLORS=$LS_COLORS:'di=0;32:' ; export ...
1
vote
1answer
19 views

What is the equivalent of pstop on OSX?

Is there an equivalent of pstop in OSX? How is pstop different to kill?