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)

3
votes
1answer
164 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
38 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
34 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
66 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
336 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
1answer
347 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
47 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
62 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
47 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
440 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
131 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
215 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
453 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
317 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
618 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
0answers
267 views

Difference between curl -d `data` and curl -d @file

I would like to convert my configuration files for ElasticSearch from JSON to YML. I am using curl for all REST related opertions overhanding the file via $ curl -X PUT ...
0
votes
4answers
179 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
339 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
275 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
772 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
24 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
298 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
3k 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
67 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
429 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
515 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
134 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
137 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
194 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
332 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
184 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
69 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 ...
0
votes
0answers
199 views

Error when installing Fedora 19 on MacBook Pro (early 2009)

I try to install Fedora 19 on my MacBook Pro alongside OSX. First of all I create a bootable USB with Fedoras Live USB Creator (under Windows). When I then try to boot from that via rEFIt it only ...
0
votes
0answers
100 views

Increasing the partition size of Kali in VMWare Fusion on a MAC

I've tried using Gpartition but the option to edit the partition isn't available. I've also obviously increased the space VMWare Fusion 4 saves for the vm to 80gb which shows in GPartition.
5
votes
2answers
885 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 ...
0
votes
0answers
41 views

How do I restore the directory expansion arrows on Nautilus?

On Mac OS X in the list view I can click on arrows to the left of the directory and expand the directory's contents. I used to be able to do the same on Nautilus, but that functionality now seems ...
3
votes
1answer
289 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\ ...
3
votes
2answers
245 views

Mac OS X command-line tools - differences from FreeBSD

As I understand it many Mac OS X command-line tools (like ls, cp, chmod, chown etc.) are imported from FreeBSD. Which version of FreeBSD contains the command-line tools most compatible with the OS X ...
1
vote
1answer
35 views

why the “open” command runs under the home directory?

Under Mac OSX (Mountain Lion), I have a shell script "a": #!/bin/bash open -a Terminal b which run another shell script "b" using Terminal: echo `pwd` Something interesting is that, no matter ...
1
vote
1answer
47 views

How can I get a regular gcc etc. under HomeBrew under Mac OSX Mountain Lion?

I have a Mac with command-line developer tools installed, including Apple's LLVM C compiler, present as /bin/gcc. How can I get a real gcc installed so that e.g. make will see the standard gcc ...
1
vote
1answer
1k views

convert timestamp to formatted time OSX

I had this working on Ubuntu but I'm now trying to run the script on OSX but it seems that the formatting of date is different. Originally I had: date -d "$MODDATE" +%F" "%H":"%M where $MODDATE is ...
2
votes
2answers
305 views

See extended attributes with coreutils ls on Mac

I have coreutils installed via MacPorts on my Mac running OS X 10.8.4. I have ls set to use the coreutils version of ls [(GNU coreutils) 8.21] when available: if [ -e /opt/local/libexec/gnubin ]; ...
1
vote
2answers
126 views

Remove 2 and 3 newlines in a text file but not 1

I'm developing on a max osx 10.8 and have no preferences to which tool to use probably sed but it doesn't matter. Update after comment: The input file uses windows new lines if that's complicates ...
10
votes
6answers
4k views

How can I display the contents of a text file on the command line?

I would like to display the contents of a text file on the command line. The file only contains 5-6 characters. Is there an easy way to do this?
3
votes
4answers
198 views

Show video files with its size

I need all the .mp4 files' dimensions to be printed with the file name. For example: 1_VIDEO.mp4 1204x680
1
vote
1answer
242 views

Non-ASCII characters handled incorrectly on command line

I have a problem with non-ASCII characters in the Terminal on Mac. If I write: echo ÆØÅ Then press Enter, Arrow Up, Arrow Left, so the cursor is between the Ø and the Å, then write X, then the Å is ...
1
vote
0answers
146 views

Can't unlock a file for path change

I'm trying to order the path entries on my mac, but it seems that my /etc/paths file is Locked. I tried the instructions on this link, but I can't save the file as it is locked. I even tried chflags ...
1
vote
1answer
99 views

Why is this copy/paste in vim configuration not working properly?

I have the following in my .vimrc vmap <C-c> y imap <C-p> <esc>P So that I can do my classic sortcut for copy/paste. It works fine on Cygwin but not in my ssh session to ...
5
votes
2answers
244 views

Prevent a file from being deleted even after rm -f

I usually stay on StackOverflow but I think on this topic you guys are much more experts here. So today's exercise is weird, I have to write a script.sh and in it do whatever I can to prevent ...