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
1answer
23 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
15 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
38 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
12 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
381 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 ...
-1
votes
0answers
19 views

Command not found using tmux on osh [closed]

I have installed gem pry-remote. The problem I'm having is that the command pry-remote can't be detected when I ran tmux on iterm2 but it's detecting it if I exit tmux. This happened after I updated ...
0
votes
1answer
28 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
53 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
22 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
46 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 ...
2
votes
0answers
58 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
14 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
37 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
110 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
31 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
377 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
15 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
130 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
29 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
431 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
35 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
21 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
22 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
40 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
72 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
76 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
18 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
42 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
31 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
70 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 ...
2
votes
1answer
46 views

Running a command without ./

I am trying to understand something that might be very simple for a lot of you but is quite puzzling from me as a daily Windows user. I am following the docker installation on Mac OS X. One of the ...
1
vote
0answers
71 views

Add a user for Postgres on Mac

I've had a very difficult time trying to set up a postgres database. I am using Mac OS X 10.9.2. I am using this tutorial: http://tutorials.jumpstartlab.com/topics/environment/environment.html The ...
0
votes
3answers
84 views

Obtain .cer file from .pem file

I have generated RSA private key using below command: openssl genrsa -out privkey.pem 2048 And created a self signed certificate using below command: openssl req -new -x509 -key privkey.pem -out ...
1
vote
1answer
29 views

Using a zsh function in find?

I'm on OS X and have defined a function called finderpackage that tries to determine if a folder is in fact a "package" (also, somewhat erroneously, known as a "bundle") according to the Finder. My ...
0
votes
0answers
25 views

zsh completion doesn't correct ? (question mark) in paths

So, I've been pretty happy with my zsh completion and correction configuration for a while now, with this being a major exception. Configured as I have it, the shell routinely catches and corrects ...
0
votes
1answer
32 views

-bash: pkcs12: command not found

I am trying to export the private key and certificate to p12 file using below command in my mac os X - Mountain Lion: pkcs12 -export -out privkey.pem -inkey privkey.pem -in rsaCert.crt but I am ...
1
vote
1answer
141 views

Mac OSX vs Linux Unix-ness [closed]

So I know that Linux is considered "Unix-like" while OSX is Unix. Why is this? I feel like Linux is much more "Unix-like" than OSX is. What makes OSX more "Unix" than Linux?
1
vote
0answers
22 views

newsyslog for paths with empty spaces

How can I configure newsyslog to trim logs with paths containing empty spaces? I define my paths at /etc/newsyslog.d/frank.conf like this: "/Users/frank/Library/Application ...
0
votes
1answer
56 views

Using eval and sed to perform counting and script control

Following the original issue described here:- Rip chapters of a DVD to separate files ..would someone help us understand what the following code is doing:- # count Titles, and count Cells per title. ...
0
votes
1answer
56 views

Move Data from Partition to Partition on Same Drive

Moving data from one drive to another is slow. Copying data on a drive to it's self is slow. Moving data from one drive to it's self is fast. If I'm moving data on the SAME drive but a different ...
3
votes
1answer
143 views

How do I start a virtual machine in background upon OSX system start?

I have a virtualbox machine on a OSX 10.9.2 host. I do not want to open VirtualBox everytime and start the machine there. Also, I do not need the the screen output as I will just ssh from OSX terminal ...
0
votes
2answers
30 views

env command shows 3 times same path

When i run env it shows 3 times /usr/bin under PATH . Same for every path under PATH title. For example - my scala bin directory shows 3 times . However, in my .bash_profile, it is written just one ...
-1
votes
1answer
73 views

Why sudo ./bin/mysqld_safe & on Mac OS X 10.6.8 doesn't ask for password?

I get the following permissions from terminal: $ cd /usr/local/mysql $ ls -l drwxr-xr-x 41 root wheel 1394 29 Apr 00:55 bin drwxr-xr-x 4 root wheel 136 29 Apr 00:55 docs ...
1
vote
1answer
39 views

How to fix SSH on OSX?

I have been able to connect to OSX machine using ssh client successfully for hours, but then it stops working and I get connection refused. ps -ax | grep ssh 841 ttys004 0:00.00 grep ssh Using ...
2
votes
2answers
130 views

grep print relative file path when doing a recursive search

I'm trying to find out which version of hibernate the project depends on (this is orthogonal to my question). We have a parent project with several sub projects, and I know this is defined in one or ...
0
votes
0answers
23 views

Networksetup, how do I make an IF loop for error on connection?

I'm attempting to connect to a network in Mac OSX with this command: networksetup -setairportnetwork eno "NETWORK_NAME" and can most often connect to the network. But I need to make an IF loop for ...
1
vote
3answers
74 views

Remove multiline text with special chars from all files in a folder

I have multi-line text with special characters (i.e. //*(): etc) looking like following in multiple files in a folder that I'm trying to remove. Tried all different solutions using sed and awk but ...
2
votes
2answers
46 views

How to format textutil -excludedelements

I use Geektool on the Mac to display various information on my desktop. One feature of Geektoool is the ability to use shell mode to launch custom scripts or commands. I am not versed in any type of ...
2
votes
0answers
337 views

Installing Arch Linux alongside OS X - Bootloader issues

I have installed Arch Linux alongside my OS X install on my MBP 11,1 using the guide found here, however on the last three commands of the boot loader section I get the error /usr/sbin/grub2-probe: ...
1
vote
1answer
32 views

osx server, windows client, running emacs opens it on server not client

I've installed emacsformacosx on my OSX box. I'd like to shove my macmini in a data center and run it headless. I've gotten x-windows working. If I run xeyes, it displays on my Windows 7 client. ...