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

Octave - warning: unable to open X11 DISPLAY

My setup is as follows: Octave 3.6.4 Mac OS X Mavericks 2009 Macbook Pro I'm trying to run Octave in Terminal, with gnuplot. I'm trying to plot matrices in a graph, as part of an online Coursera ...
0
votes
2answers
176 views

Problem with file permissions in shared directory under /srv between OS X and Ubuntu

I'm setting up some folders where any user in the users group can collaborate on files, on a Ubuntu 12.04 LTS server. It seems that users on my machine have no problems editing each other's files (I ...
3
votes
1answer
94 views

Spawn a new terminal window from the terminal

Is there any terminal command I can execute that will pop open a new terminal window? I need something that will work in OSX' Terminal.app, but it would be nice if there were a way to do this that ...
1
vote
0answers
141 views

sshfs and Emacs: file changed on the disk

I am using Mac 10.6.8 SSHFS version 2.4 fuse4x library version: FUSE 2.8.7 / fuse4x 0.9.2 I connect via sshfs to a remote cluster (via a bridge). I modify the remote files with emacs. The problem ...
1
vote
0answers
50 views

sshfs: experiencing data loss

I am connecting to a filesystem on a remote server via sshfs. What I do is just to modify these files with emacs. From time to time I am experiencing data loss. While I work on a file and try to ...
5
votes
4answers
3k views

How to use ifconfig to show active interface only

By default ifconfig will show me all available interfaces , but what if I just want to display active ones? Like, en0 only in below. en0: ...
0
votes
2answers
876 views

Rename file in Mac OS Terminal using Regex

Hundreds of images need to be renamed with a terminal command using regex on MacOS 10.9 Mavericks. The files are named this way: 0045AW489R3T(IPCAM)_0_20131124101245_931.jpg ...
2
votes
2answers
82 views

OS X: how to keep the computer from sleeping during a http connection

An application I use downloads data from a specific server, and I need it to sleep after the download has finished and the socket is closed. However downloads take place at random days, the app that ...
2
votes
1answer
1k views

Get the current volume level in OS X Terminal CLI?

I would like to check the current volume level from the CLI on my Mac. I know I can set it like this: osascript -e 'set volume <N>' But that doesn't seem to work when trying to get the ...
0
votes
1answer
27 views

Weird logging behavior in Berkeley mail on a Mac

I use Berkeley mail (/usr/bin/mail) on an iMac. It has just started behaving in strange ways. If I type "~v", to open an editor, I get "[LogLevel VERBOSE]" or sometimes "[LogLevel DEBUG]" and the ...
1
vote
0answers
42 views

Preserving owner/group on OS X-provided CIFS shares

I read the attached StackExchange link: Automatically disable Linux extensions for Samba mounts about disabling CIFS Unix Extensions in order to mount OS X CIFS shares. However, my understanding is ...
1
vote
0answers
114 views

Getting g++ to work on Mac with Xcode

In trying to get g++ to work in terminal I ran a command which I have now learned is outdated. I think this is why running g++ in terminal returns an error but I am unsure. If I try to run any .cpp ...
1
vote
1answer
85 views

Make terminal print name of parent process OSX [closed]

Slightly above n00b, but not by much. I made an alias to search for and display all of the processes associated with a specific user account that seem to auto initiate every time I log in, which are ...
1
vote
1answer
555 views

startx from mac osx to RHEL6

I am trying to get a GUI over ssh -X. My RHEL6 server did not have X Window System and a graphical desktop environment. So I installed using yum groupinstall "X Window System" Desktop. It installed ...
1
vote
1answer
1k views

How can I change my bash prompt to show my working directory?

I can print my current working dir like this myPrompt$ pwd /Users/me/myDir I want my shell to look like this /Users/me/myDir$ pwd /Users/me/myDir Is that possible? How can I do it?
2
votes
4answers
1k views

How can I find out where the firefox bin is?

I am trying to add Firefox to my PATH like in this tutorial. I have Firefox in the Applications folder of my GUI on my mac book air. I am familiar with adding locations to my path. But I don't know ...
3
votes
1answer
285 views

Why a sleep 300 (5 minutes) can last several hours some time? [closed]

I have a MiniMac with the OSX system. My script is: while true do echo "Sleep 300 seconds = 5 minutes" date sleep 300 echo "end of sleep" date done I want it to repeat every 5 minutes; ...
0
votes
1answer
39 views

Login retrieval in osx [duplicate]

I got an old Mac G4 (powerPC) from the company who wanted to put it in a bin. The company agreed that I can take it home for private use. It is running an early version of OSX but because it is old ...
0
votes
1answer
36 views

Unexpected output after switch to root

Does somebody know, why I get -ne (probably param from echo from section of setting PROMPT_COMMAND line 23) after I switch to root? Here is my /etc/bashrc. Bash 3.2.51, OS X 10.9 ...
0
votes
2answers
38 views

Merge source files with destination, replacing older ones

I'm looking for the linux equivalent of the DOS command: xcopy from/* to/* /s/e/d/y Which copies over all new files and only replaces old ones. I'll be running this from the terminal of a Mac OSX ...
2
votes
1answer
67 views

Compiling programs to OSX

I have to decide between a MacBook Pro or an iMac. I have a desktop with Ubuntu and I love it. I have experience with terminal and I install texlive, TeXstudio, Bluefish, Geogebra, wxMaxima, gnuplot ...
0
votes
1answer
633 views

Trying to cp a path with spaces, fails when scripted but echoing and pasting succeeds? [closed]

I have a script that is trying to copy a directory from a path that includes backslash-escaped spaces and is stored in a string variable to a subdirectory of the working directory. When I run the ...
6
votes
2answers
374 views

Why wouldn't a symlink to a symlink work?

I've run into a weird issue when installing SWI-Prolog using homebrew on my OSX 10.9 box. I'm trying to debug it to figure out whose bug it is (SWI-Prolog's, homebrew's, or OSX's), so I can report it ...
0
votes
0answers
48 views

Exporting Logical Volume to Mac for use as Time Machine drive

I have an Ubuntu server, and I have put a hard drive into this server. The logical volume on this hard drive looks like Device Boot Start End Blocks Id System /dev/sdb1 ...
1
vote
0answers
69 views

can't access account with empty password

I used the passwd command to remove the password for my account. Now, when I try to use su to log in to my account, it won't let me enter an empty password. So now, I can't access my account. Any ...
1
vote
1answer
48 views

OS X virtualization for software development

I am a OS X user and I work on multiple platforms for which I need multiple dependencies. I want to separate my different development dependency packages in virtual environments so they are all ...
4
votes
1answer
587 views

Mac OS X Darwin: how to reset admin password?

Today I bought an ibook G4 from a garage sale. The people who sold it to me didn't know the password for the 2 accounts on it. Apparently it was the guys late father's laptop. Any suggestions on how ...
0
votes
0answers
158 views

gdb debugging in Terminal OS X (10.8.5) with zsh - zsh doesn't know gdb

For my studies I have to run a binary unix-program called bomb with gdb. Some time ago I followed the steps on ...
4
votes
2answers
298 views

Why does du report a size of 0 for some non-empty files on a HFS+ partition?

What is the explanation for the difference: $ ls -l /Applications/Safari.app/Contents/Info.plist -rw-r--r-- 1 root wheel 15730 11 jui 15:02 /Applications/Safari.app/Contents/Info.plist $ du -sh ...
1
vote
2answers
683 views

Automatically disable Linux extensions for Samba mounts

Samba enables Linux Extensions by default, which can be checked via /proc/fs/cifs/LinuxExtensionsEnabled On Mac OS X (10.8.5 or older) as well as older CIFS shares, mount.cifs will fail with a ...
0
votes
2answers
537 views

zsh alias being overridden somehow

I'm on a system running OS X 10.8.5. I recently tried to alias ls to ls -G -la command. I opened up ~/.zshrc, put in the alias, relaunched the terminal, but the change didn't take effect. Upon ...
1
vote
2answers
926 views

How to configure a fixed user ID on an NFS server?

I'd like my NFS server to always use the same user ID to own the files, whatever user ID is used on the client. Is this possible and how?
0
votes
4answers
219 views

How do I store long hostnames list for SSH quick usage?

I have an SSH access to a lot of servers. And all that hostnames (and sometimes usernames) are long and hard to remember. Also even if I tweak my Terminal to keep eternal bash history, the using of ...
3
votes
3answers
426 views

Rename multiple files, sub directories, and insert characters at specific location on OSX

I have files and directories starting with "cateory-icon-" in many sub directories. I am trying to rename them recursively to "category-icons-". Please note that I added missing "g" to the category ...
1
vote
1answer
361 views

Hide a file extension using Terminal

I have about 40 files in my folder. I selected all the files and pressed command+I. Instead of opening one Get Info window, my Mac shows up 40 windows! Is there a terminal command to hide the file ...
1
vote
1answer
2k views

Numpy module not found despite being in path

I am having trouble with the module on python. Here is my path variable, /opt/local/bin /opt/local/sbin /Developer/usr/bin /usr/local/git/bin /usr/X11/bin /Users/oskarniburski/.rvm/bin /usr/X11R6/bin ...
1
vote
0answers
27 views

Change 4 mirrored HDDs to RAID 10

My boss has a large computer (12-core, 4 HDD computer that we use for scientific computing) and he has all of the HDDs mirrored. Is it possible to change this to RAID 10 without data loss and without ...
3
votes
2answers
367 views

Ruby update not working using two methods

I tried to install ruby version 1.9.3 with this on my mac 10.6.8: $ \curl -L https://get.rvm.io | bash -s stable --ruby Oskar-Niburskis-MacBook-Pro:~ oskarniburski$ rvm install ruby-1.9.3-p362 ...
6
votes
3answers
4k views

Mac OS X: dircolors not found?

I just switched to a Macbook Air. I installed zsh using homebrew, but when I use some of the code that I (originally had) in my .zshrc, I get an error saying that .dircolors was not found. Below is ...
1
vote
0answers
72 views

How do I recover from “chown -R myuser /usr” on OSX? [closed]

I installed git and ruby 2.0 using homebrew then terminal immediately stopped working. On opening, it gives me the following error: login(89809,0x7fff7bac5960) malloc: *** error for object ...
2
votes
2answers
649 views

How do I make the Xterm window title switch between the current running command and the current path?

I want to set the Xterm window title to switch between two states: When a command is running, show the command name (e.g. "less") When no command is running, show the current path (e.g. "src") I ...
4
votes
3answers
850 views

How to find a file with specific permission of a specific user?

How do I get a list of all the files which permission is "read and write" for a specific user. For example, when I go on the desktop of my mac, then right click on file "A", then "get info", then on ...
0
votes
0answers
205 views

Mac OS X: Terminal Prompt Username

I'm using Mac OS Snow Leopard (v10.6.8). I've changed the account name under System Preferences > System > Accounts > Full Name. However, that does not change the username on the terminal ...
1
vote
1answer
162 views

OfflineIMAP tells me SQLite isn't installed, even though it is

Whenever I run OfflineIMAP v6.5.3.1 I get an error for every folder (i.e. tag and folder in Gmail) which tells me there was a problem and then right after it tells me: SQLite backend chosen, but no ...
4
votes
3answers
213 views

OSX: dd quits after a few minutes

I'm trying to diagnose a possible disk problem on my OSX machine: I heard some funny noises, so I decided to do a read test of the entire disk using dd. A few months ago this worked: dd would run ...
0
votes
1answer
414 views

VPN Setup Errors

I'm trying to install a VPN on one of our servers for use within my campus so that we can play some games, but I appear to be getting errors when I try to connect, as shown below. Not quite sure about ...
1
vote
1answer
338 views

Managing multiple Vims (vim and MacVim)

My machine came with Vim 7.3 and I just installed MacVim 7.4, so now I'm juggling both and I'm not sure how to manage the two. I'm plagued by questions like: Should I remove the older version? Where ...
2
votes
2answers
76 views

Return username of the user who just logged in within a login script

I'm writing a login script for OSX 10.8. I need to know the name of the user who logged in via the Login Window within a login script. I've tried "whoami", "$USER", and "ls -l /dev/console | awk ...
5
votes
2answers
1k views

What should I be aware of when installing Linux on a Mac?

I have a Macbook Pro and I am loving it, though I still miss my Linux box, there are many things I need which are not completely compatible with Mac OS X. I heard many stories about installing Linux ...
3
votes
1answer
405 views

How to set the path OSX applications use

I'm running Mountain Lion 10.8.4, and have my environment all customized through ~/.profile so that when I run GUI apps like Sublime Text or Eclipse from the command line open /Applications/Sublime\ ...