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
64 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
28 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
29 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
81 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
32 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
57 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.
0
votes
2answers
61 views

How do you make filesystems in mac OSX

How do you make filesystems in mac OSX? Mac OSX doesn't have the 'mkfs' command. Thank You
-1
votes
1answer
51 views

how do I give users capabilities

How do I give users capabilities in mac OSX? I googled it and I found no answers. The 'setcap' command doesn't exist in mac OSX. Thank you!
2
votes
0answers
20 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
47 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
59 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
56 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
46 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
99 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
49 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 ...
0
votes
0answers
74 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
527 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", ...
1
vote
1answer
26 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: ...
0
votes
0answers
83 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
42 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 ...
3
votes
1answer
118 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 ...
3
votes
1answer
63 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
132 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
80 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
25 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
49 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
44 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
99 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
104 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
622 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
71 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
16 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
25 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
40 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
96 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
64 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
69 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
49 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
29 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
votes
2answers
116 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 ...
0
votes
0answers
48 views

Script file that lists contents of current folder

I have OS X, but I'm guessing it should be the same as in other Unix OSes. I know the command is: #!/bin/bash ls > contents.txt Then you put it into a file called: script.command then you ...
3
votes
1answer
64 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
0answers
11 views

What is the equivalent of pstop on OSX?

Is there an equivalent of pstop in OSX? How is pstop different to kill?
0
votes
1answer
41 views

Booting CentOS from live usb on OSX El Capitan

I have been trying to set up a live usb to use to study for the RHCSA/RHCE certification. CentOS launches and gives me the launch page I choose the standard option, I have not tried text mode etc. ...
1
vote
1answer
86 views

generate file names in loop [closed]

DISCLAIMER: I am using Mac OSX. The bash script is in a different directory from the files that require processing. From here my struggle begins… HELP 1: I have multiple files each housed in a ...
0
votes
2answers
42 views

Linux beginner. What OS should I use? [closed]

I recently started JAVA programming and I would like to start learning Linux programming simultaneously. I run a mac and I am planning to use Oracle VM VirtualBox to boot linux. What kind of Linux OS ...
0
votes
1answer
48 views

How do I remove “^M” from a file? [duplicate]

I have two "identical" files that I compare in diff, and it shows that every line is different, after looking at the file I found that one of them has ^M at the end of every line. How do I remove ...
1
vote
1answer
54 views

Using terminal to reset icon cache - which method?

I've been trying to find out how to reset the icon cache on my MacBook, and two methods seem to always be suggested. However, the two approaches differ slightly in the third line. Method 1 sudo find ...