Tagged Questions

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
90 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
498 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
21 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
29 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
80 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
264 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
286 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
57 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 ...
2
votes
8answers
3k 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
33 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
3answers
96 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
108 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
146 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
62 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
106 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
16 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 ...
3
votes
1answer
85 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
68 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
vote
0answers
29 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
28 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
126 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
54 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
182 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
24 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
2k 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 ...
7
votes
2answers
337 views

Bash inside Vim not working properly

In MacVim I'm using Conque to run bash commands inside Vim. I have a problem with the text navigation while using Conque. If I'm at the end of a line of text and press down Alt← I skip a word to the ...
0
votes
1answer
72 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
127 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
33 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
213 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 ...
4
votes
0answers
665 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
16 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
63 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
175 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
41 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
483 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
28 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 ...
5
votes
2answers
1k 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
50 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
704 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
97 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
30 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
32 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
47 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
342 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 ...
0
votes
1answer
144 views

scan and connect to wifi from linux terminal on virtual machine

I am trying to scan wifi networks via Linux terminal running on a virtual machine. I am running virtual machine on Mac OS. On MAC terminal, I can see all Wi-Fi networks using (airport) command and can ...
0
votes
0answers
26 views

How to add entries in GPT/ guid table without booting in is?

I foolishly deleted entries from guid or gpt table while messing up with gdisk utility, As a result no bootable partition shows up on startup ! I'm stuck at blank screen please help ! How shoul I ...
0
votes
1answer
64 views

How to get the same ls with colors working on both OSX and Ubuntu?

When I want color in Ubuntu I do alias ls='ls --color=always' but on OSX this gives an error ls: illegal option -- - and I need to do alias ls ='ls -G' How can I create an alias with the same ...
2
votes
0answers
41 views

OSX/Darwin ACL Format

In OS X, if you want to view the ACL information on a file, you can do so with the -e option of `ls. $ ls -lde app/cache drwxrwxr-x+ 7 alanstorm staff 238 Apr 1 10:02 app/cache 0: user:alanstorm ...
1
vote
2answers
142 views

Limiting access to a website based on IP address when .htaccess is not allowed

I am trying to limit access to a website to a small set of IP addresses. I am a regular user on the Mac OSX web server. My first attempt at limited access was to create an .htaccess order deny,allow ...