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

Re-access NFS volume from OS X Mavericks client after server reboot?

My home server, running FreeBSD 10-RELEASE p7, exports NFS volumes to my MacBook Pro, running current OS X Mavericks. The MacBook mounts these via automount as /net/servername/volume without any ...
0
votes
0answers
13 views

xrdp - Cannot connect from OSX

I just installed Centos 6.5 and put xrdp on it. I set up my iptables to allow it, and I can connect fine (both over local network and over the internet) from Windows 7, iOS, Android (using the ...
3
votes
3answers
138 views

equivalent of `grep -a /dev/sda1` on Darwin?

I want to run something like % sudo grep -i -a 'some-string' <drive device> On Linux, <drive device> would be something like /dev/sda1. How can I find the equivalent on Darwin? (In ...
1
vote
0answers
17 views

Unable to boot into Mac OS after installing Fedora[Dual Boot]

I installed Fedora on my Mac and now when I boot, it says "booting in insecure mode" an then see a typical Linux "choose what to boot" screen. The List goes like: Fedora Fedora Recovery Mac OSX ...
1
vote
1answer
23 views

How do you move files into the in-memory file system mounted at /dev/shm

Someone recently told me about /dev/shm. You all helped refine my understanding of what /dev/shm is What dev folder allows you tell the OS to cache something? The person who told me about /dev/shm ...
3
votes
1answer
22 views

Reading FreeBSD UFS formatted external drive in Mac OS X

I have an external USB drive with backup files formatted in FreeBSD's UFS file system. When I plug it into a computer running Mac OS X 10.9.4, I cannot read the drive's contents, and I don't have ...
1
vote
0answers
13 views

man causes a broken pipe when using a pager other than less

I'm trying to write a simple script to format my man pages, but I've run into a broken pipe error. These lines both cause the error: env MANPAGER=cat man $foo man -P cat $foo and this is the ...
0
votes
1answer
16 views

Installing rvm and a specific version of ruby using rvm on linux based systems

UI testing is done using ruby and selenium. Installation of rvm Installation of specific version of ruby and setting a default version of ruby Note: Using a linux based operating system.
0
votes
1answer
40 views

Add text to end of every line

I have tried a lot of commands, like this: sed -i '' "s/$/<@string>/" txt.txt > txt2.txt This makes txt2.txt empty, why?!? sed 's/$/<@string>/' txt.txt > txt2.txt This does ...
3
votes
1answer
153 views

How do I fill my password automatically from .bash_profile when running command as sudo?

I know I could just put something like sudo mypassword in my .bash_profile, but I don't want to run every command as root. I want password to autofill under following circumstances: only the ...
2
votes
0answers
35 views

Can't get rEFIt to boot after install (Ubuntu + OSX on macbook pro)

I'm trying to dual boot Ubuntu and OSX on my macbook (MacBookPro8,2). As per the usual guide, I downloaded rEFIt (the .dmg) and installed it. Then I rebooted about 12 times and still always just get ...
1
vote
0answers
23 views

Fix X11 forwarding on OSX

I am looking for a way to fix/debug a X11 forwarding session on OSX. Here is my situation: From my mac I connect to a Ubuntu workstation with ssh -X (tried ssh -Y as well). X11 forwarding works ...
0
votes
1answer
36 views

Install rEFInd on OS X 10.10 Yosemite

I want to dual boot my macbook with Arch Linux and thus tried to install rEFInd using the install script, however, after install rEFInd doesn't seem to start at all? Anyone experienced the same issue ...
1
vote
0answers
31 views

Edit a command? [duplicate]

I'm using many basic commands of unix/linux. In Mac OS X Mavericks, I type cat for a file, but output was faulty. In example, content of the file named bar: foo bar Then: ...
1
vote
2answers
47 views

nc not waiting for server disconnect on OS X

How to make nc client on OS X Mavericks keep socket open and read data until server disconnects the socket? I want to send data to a server through nc and then use the response. Problem is that nc ...
1
vote
0answers
15 views

Create bootable hfs+ partition for macbook

I've installed Debian testing on a Macbook Pro (mid 2014) without keeping OS X on the internal SSD. I've used the following GPT partition layout: HFS+ EFI on /boot/efi BTRFS on / SWAP on swap I've ...
0
votes
1answer
20 views

unable to open X server with ImageMagick Mac osx

I am trying to display an image using the following: Display someimage.jpeg It returns this: display: unable to open X server `' @ error/display.c/DisplayImageCommand/426. I have been looking at ...
0
votes
0answers
20 views

Activate iSight in Linux Mint Qiana on a Virtual Machine

I'm trying to get the built-in iSight cam of my MacBook Pro 5,1 (running OS X 10.5.8 ) to run under the just-downloaded Linux Mint Qiana edition, which I have installed in Virtual Box (v.4.1.18, for ...
1
vote
1answer
60 views

How do I force move something when sudo mv -f doesn't work?

I need to move a 16 GB folder to my external drive, but moving it manually gives me an in use error. I have tried to start in safe mode and moved it but it was still in use. I have run these commands ...
0
votes
1answer
15 views

“screen” process closes out of the blue [closed]

I spawned 4 screen processes with the following command (one after the other): screen ./"executeable" Logging back into the server I run the program on at a later time only showed 3 processes ...
-2
votes
0answers
19 views

How to manually remove GCC (without package manager) on Mac OS X Mavericks

I would like to completely remove GCC from my Mac OS X Mavericks system. The problem is I have installed it manually without a package manager. I have tried to list all files from the GCC tar archive ...
3
votes
1answer
72 views

Is this a so-called “Hybrid” Mac Partition table, and how can I mount this in Linux?

I would like to better understand what is on this hard disk, and how I can mount it into Linux (specifically Debian GNU/Linux, Stable): It was created on a Powerbook g4 "alu book" with the default ...
-2
votes
1answer
60 views

Why should I get linux? [closed]

Ok so I am student, about to get my degree in computer science. I have been programming for couple of years now on my Macbook pro on OS X and I havent had any problems. On the other hand, everyone ...
-1
votes
0answers
54 views

Sum of all files does not add up to used disk space. Why?

A big folder on my external hard drive is missing and I am trying to find out where it went. When looking at the properties of my volume I found this weird difference between the sum of all files and ...
1
vote
0answers
21 views

How can I unveal files on my external hard drive?

I copied a big folder (around 110 GB) from my (Mac 10.7.5) computer onto a hard drive (exFAT). It took quite some time and afterwards I even checked that the files were actually there. After more ...
0
votes
1answer
26 views

Where should xt.vim be put on osX?

Cracking xDebug open, finally and looking to add the vim formatting file from xDebug.org. It says to "copy" the file to ~/.vim/syntax. But such a directory doesn't exist on osx 10.6. I don't see ...
2
votes
2answers
90 views

Is there a way to get “top” to run exactly once and exit?

I find the output of the shell command top to be a simple and familiar way to get a rough idea of the health of a machine. I'd like to serve top's output (or something very similar to it) from a tiny ...
0
votes
0answers
22 views

X11 Path Issues and Confusion for Installed Packages

I am using GMT (generic mapping tools) and SAC (Seismic Analysis Code), and each use X11 (or XQuartz on 10.9.4 Mavericks) to display graphics. When I want to display postscript using ghostview, I get ...
0
votes
1answer
62 views

Writing a Bash script to run and end at specific times

I'd like to create a script that will do the following. Start at a given time during the day and end at another given time. So for example, I have a program I'd like to test, so my script would be ...
1
vote
0answers
20 views

Resizing terminal splits

I'm trying to find a way to manipulate my terminal splits In my .vimrc I have set width=78 When I have vertical splits and change back and forth the active split is at least 78 chars. It squishes any ...
8
votes
3answers
461 views

Creating a Bash script that will execute a program and if it exits without crashing, will run it again

I'd like to know the easiest way of creating a bash script that will run an app in MacOSX (it's a UNIX based system so I assumed this was the right place). wait for the program to exit. If the exit ...
0
votes
1answer
39 views

Get driver location for particular printer via command line

This is on OS X 10.8. I want to be able to arbitrarily pull the configuration for a particular printer, so I can use it in a package-creation script. The script (not mine) uses /usr/sbin/lpadmin -p ...
1
vote
1answer
74 views

How to transfer data “offline” between osx and ubuntu?

I need to transfer around 50gb of data from my Ubuntu to my OSX. scp and samba are both too slow it seems - even with the Ethernet cable connected (14-15 hours!). I have physical access to both ...
0
votes
1answer
26 views

Convert linux symlink to osx symlink

I have transferred a folder from a linux machine to a macbook pro with osx 10.9, now I am having trouble with the symlinks in this folder (lots of them). In linux if I do vi link2file.txt, it has the ...
1
vote
1answer
58 views

sudo chown -R $USER:admin /usr/local - revert back to ROOT?

On OS X, but may also apply to *NIX. This question was asked/answered previously, and I know it's safe to chown on /usr/local for my admin user account, which I've done to install git with homebrew ...
3
votes
0answers
123 views

Can't figure out why ssh_exchange_identification: Connection closed by remote host appear

At home, I have setup a Raspberry Pi with the latest version of Raspbian and with ssh enabled. I also use a Mac Book Pro with OS X 10.9.3. I use ssh pi@192.168.0.22 to do some work on the Raspberry ...
0
votes
0answers
15 views

Mac Firebreath plugin port to Linux (dependencies)

I have Firebreath plugin for Mac that I need to port to Linux. I am trying to find the replacement dependencies for the Linux version. Here is the dependencies I have in my cmake for Mac: ...
1
vote
1answer
44 views

Control + L not clearing screen

When I try to clear my terminal screen on OSX: computer@ ~ () $ ^L And when I hit Enter after that it just shows: -bash: : command not found Any ideas on how this happens? My .bash_profile, ...
6
votes
2answers
120 views

Why do some applications stop working when permissions are changed in /usr/bin?

On OS X, a friend of mine changed the permissions on /usr/bin recursively using Finder, in order to grand write access to everyone. Here is how it's done: Go to /usr/bin in Finder, then mess with ...
1
vote
1answer
35 views

How can I tell why a process is waiting?

I'm trying to run a command on OSX Mavericks and it seems to be hanging. I found out that Control + T is a Unix command to show the status of a foreground job. Pressing it several times over the ...
7
votes
3answers
407 views

How to permanently change both STDOUT and STDERR color to grey?

This question is similar to Can I configure my shell to print STDERR and STDOUT in different colors? But I am looking for a solution that will allow me to change both STDOUT and STDERR to ONE color. ...
2
votes
3answers
18 views

Piping content with multiple spaces

I was attempting to copy files listed in a text file into a directory such as: cat files.txt | xargs -I{} cp "{}" ~/Desktop/temp However I noticed that some files would not copy over. The files ...
3
votes
2answers
239 views

ssh-add in not persistent between reboots

I add a ssh key to the agent by $ ssh-add ~/.ssh/id_rsa_mac Identity added: /Users/alex/.ssh/id_rsa_mac (/Users/alex/.ssh/id_rsa_mac) After reboot I don't have this key added anymore: $ ssh-add -l ...
3
votes
2answers
32 views

How can I list the info for an array of /dev/disks using bash expansion or substitution?

I want the output of: diskutil list; diskutil info [multiple devices] Without having to do: diskutil info disk0; diskutil info disk0s1; diskutil info disk1 ...etc For example, with many builtin ...
5
votes
1answer
453 views

What is equivalent to Mac's purge in Linux?

In Mac I use purge to free up some memory. What is equivalent to it in Linux(Ubuntu Server)? apt-get install purge gave me nothing. If you are no familiar with Mac's purge here is it's man page: ...
2
votes
1answer
52 views

Set file creation date to its modification date on OSX

I need to batch edit file creation date (some stupid audio recorder set the file creation date to UNIX epoch and the correct recording date in the modification date) to set it to the files ...
0
votes
0answers
24 views

[Solved]man crashes on OS X after upgrading bash and its manpages

Bash on OS X is always so old that I finally decided to compile a never(4.3.18) one and simply override and replace the old one. Here are the configure flags I used: ./configure --prefix=/ ...
0
votes
0answers
28 views

Why does directory vanish when I do SSHFS? How to setup SSHFS share on Max OSX 10.9?

I'm running Max OSX 10.9.3 and I'm trying to setup an SSHFS file-share between my MacBook Pro and a remote file system. However, when I try to do it, it doesn't work. Strangely enough, it makes the ...
2
votes
2answers
42 views

Is it possible to obtain OS X versions of Unix tools on modern Linux distributions (like Ubuntu or RedHat)?

I have observed that there are often subtle and often annoying differences between the default versions of certain command line tools like paste and sed on modern distributions of Linux versus OSX. ...
1
vote
1answer
114 views

How to change the output color of ls comman in terminal in OS X and iTerm2?

I know that a similar question has been as in: How to colorize output of ls ? Though, I didn't really understand the answer and couldn't really make it work. However, I have tried something ...