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)

2
votes
2answers
44 views

find and sed (find and replace) causes illegal byte sequence on Mac OS X

I am attempting to perform a find and replace of underscores to dots in a directory for certain filetypes only (.mkv, .mp4, .avi). This is the code that I am using (I'm on Mac OS X 10.9): find . \( ...
1
vote
2answers
6k views

Booting Ubuntu from usb on a Mac

I have a Macbook pro (late 2009) running OSX 10.6.8. I want to partition a flash drive and install my Ubuntu iso image onto it. Then I want to boot up from it by (restarting my computer and) holding ...
3
votes
1answer
2k views

Sound volume control does not work in Ubuntu

My sound volume control does not work when I'm logged in with my regular user, though the sound works correctly. What's weirder is that the sound control works when I'm logged in as guest. With my ...
11
votes
3answers
3k views

Fix or alternative for mktemp in OS X

I'm looking at a bash script someone else wrote that uses mktemp: TEMP=`mktemp --directory` However, this line does not work on my machine (OS X 10.6). How would I fix this line so that it is ...
0
votes
1answer
28 views

Yosemite + Fusion 7.0.1 now gets “Could not open /dev/vmmon: No such file or directory.” and will not start any VM

I've been on Yosemite on this machine since it hit released, and on Fusion 7 since it released. Now on 10.10.1 and 7.0.1 respectively. On one machine ...
1
vote
1answer
24 views

Updating a bunch of Macs via SSH. Could use some help

all. I'm working on a script that'll be running from our Mac server, and it will (hopefully) update all of our Macs via Munki (repo is on the same server) and the built-in softwareupdate command. ...
2
votes
1answer
358 views

Sending raw video stream over network to an encoder

I'm trying to build a setup using OS X machines for streaming live video. Currently I use Flash Media Live Encoder on the same machine that is handling the video input unfortunately because FMLE uses ...
0
votes
0answers
507 views

Why is my Mac, upgraded from Mavericks to Yosemite, no longer giving VMware Fusion needed resources?

I have a Mac upgraded from Mavericks to Yosemite. When I tried to run VMware Fusion, I got an error stating: Could not open /dev/vmmon: No such file or directory. Please make sure that the kernel ...
1
vote
1answer
43 views

log rotation fails for dnsmasq on osx using newsyslog

I am running dnsmasq on OSX. I am also using newsyslog to rotate log files. Here is the /etc/newsyslog.d/dnsmasq.conf # logfilename [owner:group] mode count size when flags ...
15
votes
3answers
562 views

Why don't shell builtins have proper man pages?

All shell builtins share the same manual page: BUILTIN(1) BSD General Commands Manual BUILTIN(1) NAME builtin, ! etc. Then there is a little text describing ...
2
votes
0answers
50 views

Accidentally deleted /var folder

I accidentally moved my /var folder to trash and now unable to login to Mac. The only solution I found until now is to recover OS X. I have tried to move /var back to /private folder in single user ...
27
votes
5answers
8k views

Is Mac OS X UNIX?

I have this argument recently saying Mac OS X was not UNIX, but Unix-like. I know there is a Single Unix Specification and those spec complaint could use the UNIX trade mark. Is Mac OS X an UNIX ...
54
votes
10answers
28k views

How do I know if dd is still working?

I've not used dd all that much, but so far it's not failed me yet. Right now, I've had a dd going for over 12 hours - I'm writing an image back to the disk it came from - and I'm getting a little ...
2
votes
2answers
115 views

Negative arguments to head / tail

Variants of this question have certainly been asked several times in different places, but I am trying to remove the last M lines from a file without luck. The second most voted answer in this ...
1
vote
1answer
23 views

Unable to view Applications Directory Content in Terminal

Not sure what I'm missing here, but when I try to list the contents of the Applications directory from the Terminal it produces a directory with a couple .dmg files and none of the actual application ...
3
votes
1answer
781 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 ...
-2
votes
0answers
32 views

Names of the terminal have changed [closed]

We are at school at this moment. We are using MacBooks. To some of our classmates, the name present as prompt in the terminal has changed, what could be the problem?
2
votes
1answer
48 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 ...
3
votes
10answers
6k 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
1answer
53 views

OS X SSH keeps asking for password [closed]

I connect from a Linux machine to several Macs over ssh using public/private keys. The setup is the identical on every ac, different OSs from 10.5 to 10.9 and publickey working. Only one of them, ...
4
votes
3answers
5k views

Fork bomb on a Mac?

I just learned about a fork bomb, an interesting type of a denial of service attack. Wikipedia (and a few other places) suggest using :(){ :|:& };: on UNIX machines to fork the process an infine ...
0
votes
1answer
452 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 ...
2
votes
1answer
40 views

How can I know which organisation a special command line tool is belong to?

Frequently we use command line tools to do fancy things in UNIX like system; many of them have a manpage and typically we can know which orgnization/person owns the copyright. For example, on Mac OS X ...
0
votes
0answers
27 views

Weird behaviour of SCP on OS X [closed]

I am followind this example: scp -r jeff@myhost.com:/home/jeff/documents /Users/andi/what_the_barman it should: Copies all files in the remote directory /home/jeff/documents on the server ...
1
vote
1answer
45 views

sftp command to get/download .tar.gz file

I thought I was familiar with sftp commands in unix and upto my knowledge the command to used to download a compressed file from the server is sftp get filename.tar.gz But when I tried this ...
1
vote
1answer
29 views

Different results OS X/Linux with “find PATH -mount \( -type f -o -type d \) -print0 | LC_ALL=C sort --zero-terminated > OUTPUT.txt”

this command is part of a script I use for comparing files: find test/ -mount \( -type f -o -type d \) -print0 \ | LC_ALL=C sort --zero-terminated > OUTPUT.txt // test/ is the PATH ...
2
votes
2answers
33 views

Emulating /etc/cron.d/ on OSX

On most modern unixes, cron supports individual crontab files in /etc/cron.d, in which each task executes as a specified user. These files automatically update the crontab once edited. They allow ...
0
votes
0answers
101 views

libfreenect2 - libusb -99 error

I need some help, when I am running protonect, the IR blaster go on but no frame is captured. It's some sort of libusb error. Running on Mavericks, with an express card adapter with "Nec µPD720202" ...
0
votes
1answer
36 views

Macbook System Profiler formatted

I want to format the output generated from macbook terminal command system_profiler and transpose the row values to columns under the same Application. Here's a snippet of the file: Firefox: ...
0
votes
1answer
46 views

How do I search for every file with executable permission (+x) in my system? [duplicate]

I need to find every single file that has executable permissions in my system, i think they end with x@. I tried to ls every file and then grepping the output to match files with x@. Like this: ls ...
10
votes
2answers
881 views

Is it OK to use “.” to run files instead of source - in .bashrc in Ubuntu and OS X?

OK, so source runs the script in the current shell and . separately, as detailed in running script with ". " and with "source " for example, but, specifically, in my .bashrc file, ...
0
votes
0answers
14 views

MP3s Slow - audio settings in VirtualBox VM

Collection of mp3 files imported to VirtualBox (via binary ftp) from host sound very slow, so assume are playing at wrong bitrate. Checksums match as per /usr/bin/openssl md5 *.mp3 (on OS X) and ...
0
votes
0answers
12 views

default llvm toolchain issue on Mac

Recently I have been using Mac 10.10; but I find that the compilation toolchain is a bit odd to me. It's known to us that on recent Mac OS versions the default gcc is a faked one that is based on ...
1
vote
0answers
14 views

Bandwidth stats on wifi for each network?

Is it posible to have the bandwidth usage of the wifi connection for each network I use? Currently I have vnstat instaled on my MacBook Pro retina runing Yosemite. It works well but I have the usage ...
2
votes
0answers
39 views

SSH SOCKS5 proxy, is my traffic being kept safe?

So I've been running everything on my system through my SSH SOCKS5 proxy. All the network commands I type in the terminal, I use proxy chains, and I have my system set to use my SOCKS5 proxy globally ...
1
vote
2answers
80 views

How to get proper format from date for the touch -A argument?

I would like to change all of the attribute times of some files to the immediate date. It appears that I would need to use touch -A * (more or less; realizing that I am going to use a more complex ...
0
votes
1answer
56 views

Why won't OS X let me rename a file?

I accidentally named a file testIn2Post.py rather than testIn2post.py (notice the different case for the letter "p") and have been unable to rename it, even after rm-ing the file in question. Notice ...
2
votes
2answers
801 views

Quickly check whether many network hosts are up-and-running

Objective: check if a host is up-and-running on the network, with a method that can be efficiently parallelized over many hosts. Emphasis on a QUICK turnaround of the check. Reason to emphasise ...
3
votes
1answer
57 views

Changing the spacing between files in ls

This is more of a cosmetic question but this is really bugging me. On OS X, when I run ls -G (or use CLICOLOR=1) instead of regular ls it changes the spacing of the columns, as you can see in this ...
26
votes
1answer
1k views

Why can Shell builtins not be run with capital letters but other commands can?

Why is this? When I do this CD ~/Desktop It doesn't take me to the Desktop. But this: echo "foo bar" | GREP bar gives me: bar
1
vote
2answers
52 views

find -delete does not delete non-empty directories

$ find ~ -name .DS_Store -ls -delete works on Mac OS X, but $ find ~ -name __pycache__ -type d -ls -delete does not - the directories are found but not deleted. Why? PS. I know I can do $ find ...
2
votes
1answer
65 views

How do I choose a file names with consecutive numeric suffixes?

I like to preserve things, so I want to preserve .bash_history. I would like to copy it into a directory using a script. Like here #!/bin/bash #Something here? number=~/Desktop/Coding/Bash\ ...
0
votes
1answer
113 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 ...
2
votes
2answers
487 views

How to fix weird vim polluting the terminal behaviour on arrow keys and on delete in insert mode?

My terminal gets polluted by B, C,A,D when I try to navigate within vim using arrow keys and on delete using backspace it only scrolls back without deleting the characters on screen while the ...
1
vote
1answer
616 views

sudo service command not found when installing mongodb

I am currently on OS/X using macbook. I want to stop the instance of mongodb service running. Hence I tried: > sudo service mongodb stop sudo: service: command not found After looking up on ...
1
vote
2answers
31 views

Changed terminal permissions

For no known reason I suddenly have to execute most terminal commands using sudo. For example, I have always been able to run "git pull/push" etc. without any trouble. Now, I get "permission denied". ...
1
vote
2answers
622 views

Linux guest VM on mac host - Keyboard

I use a Mac as a development box, but am slowly transitioning to Linux. So I am spending the majority of my time in the Linux guest VM while working. But I still spend a fair amount of time in Mac ...
2
votes
1answer
923 views

Transferring Files SSH SCP Error Message: 'Stdin: is not a tty'

I am using a Macbook SSH terminal and generated RSA key pairs and uploaded remote id_rsa.pub with approved permissions. I can connect with remote Apache web server. I can create, open, move, modify ...
1
vote
1answer
98 views

Confused about how to convert XML to CSV using xmlstarlet on OS X?

I asked a question earlier and it was closed as being a duplicate: How to parse XML to CSV with a shell script?. The answer in the duplicate that was linked suggested using a tool called XMLStarlet, ...
0
votes
1answer
14 views

How can I get my Apache server to point to the correct location?

I am trying to point my apache server to use various packages I have in my Eclipse workspace which is not located in the default Apache server directory. So far, no luck, all I get is Not Found error. ...