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
6 views

How to troubleshoot: “X11 connection uses different authentication protocol.”

I start an ssh session with localbox % ssh -vvv -Y remotebox 2>debug_ssh_log ...which succeeds. Then I try to run xlogo on remotebox, but the command fails immediately, and the following lines ...
0
votes
1answer
36 views

.bash_history keeps truncating

My .bash_history keeps truncating even though I set: export HISTSIZE= export HISTFILESIZE= On my .bash_profile. Im not sure when it happens but it might happen when I logout or shut down my ...
0
votes
1answer
23 views

Software installation trouble with Homebrew

I have previously custom installed Python and Homebrew on my OS X 10.9.5 system. I am now trying to install CMake and I am running into various errors such as: cd: /usr/local/src: No such file or ...
2
votes
1answer
56 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 . \( ...
0
votes
1answer
32 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
0answers
53 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 ...
2
votes
2answers
117 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
24 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 ...
-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?
1
vote
1answer
58 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, ...
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 ...
1
vote
1answer
50 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 ...
2
votes
2answers
34 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 ...
15
votes
3answers
565 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 ...
1
vote
1answer
30 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 ...
0
votes
1answer
37 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
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
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 ...
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 ...
1
vote
1answer
46 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 ...
0
votes
1answer
57 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 ...
0
votes
0answers
544 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 ...
2
votes
0answers
40 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 ...
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 ...
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
66 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\ ...
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
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 ...
1
vote
2answers
32 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
1answer
102 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
15 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. ...
0
votes
0answers
33 views

VirtualHost configuration not working

I followed this article, mixed with some other research, in an effort to get VirtualHost configuration up and running on my Mac. However, for some reason when I navigate to my local.site.rocks URL it ...
2
votes
1answer
43 views

Move thousands of jpg files into daily directories based on the files EXIF creation date

I have thousands of jpg's and mp4's that need sorting into a directory structure which name is based on the date the picture was created. Preferably from the EXIF date as the files modified date might ...
1
vote
0answers
39 views

Mount FileVault encrypted drive in OS X 10.9 in Recovery Mode without unlocking it; Passware brute-force

I encrypted my internal hard drive with FileVault a while ago on Lion such that it prompts for the disk password when I restart the computer and recently upgraded to Mavericks on my MBPro Retina. It ...
1
vote
3answers
68 views

Remove patterns from string using bash

I'm trying to remove some patterns from a file input string (parsing file line by line). Here is a sample string: 1: (10/17 12:49:31.175) - CONSTANT ID1 - CONSTANT ID2: RAW DATA OUT > ...
0
votes
0answers
105 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" ...
48
votes
2answers
3k views

Shebang starting with `//`?

I'm confused about following script (hello.go). //usr/bin/env go run $0 $@ ; exit package main import "fmt" func main() { fmt.Printf("hello, world\n") } It can execute. (on MacOS X 10.9.5) $ ...
5
votes
1answer
63 views

How do folder name localizations work?

In Mac OS X, there are directories like Desktop, Users and Library. On localized systems, these would be named Skrivbord, Användare and Bibliotek (Swedish) But when I am in the terminal I can't ...
0
votes
1answer
63 views

Kill unresponsive process by name but preserve responsive processes

For some reason, I end up with a fair few Google Chrome Helper processes which stop responding, hogging CPU resources. Usually I just run killall Google\ Chrome\ Helper, however this kills all, ...
2
votes
1answer
165 views

How to fix invalid map node linkage?

My drive is formated to hfs+ and it is not clean. In example when I'm trying to mount the drive by mount -f -o rw, dmesg displays the error: hfs: Filesystem was not cleanly unmounted, running ...
1
vote
0answers
31 views

Get path of currently marked file

Im running OS X and I'm wondering if there is a way to get the path of the currently marked file in Finder. Like, can UNIX determine what file i have clicked on? Reasons for this would be for ...
1
vote
1answer
26 views

Command line tool for making icon files?

Is there any command line tool for making icns files to use for OS X apps? I am aware of icontool but it doesn't do what i want. It converts iconset files into and icns file. What i want it to do is: ...
0
votes
1answer
23 views

'last' does not include logs for few last days

When I execute 'last', I do not see logs from past 6 days. What could be the case? Is it possible to clear these logs? I'm on OS X Mavericks.
2
votes
0answers
50 views

Open a program (VLC) and move it to the foreground

On a Mac, specifically, when I use the VLC command line to open a video file, it opens in the background by default. How can I instead move it to the foreground whenever I run the command to open a ...
0
votes
4answers
75 views

grep for files and open the resultant matches

I'm trying to open all files based on some return values from grep in the command line. I know that I can use the -l option to only return filenames, but I would like to combine this somehow with ...
2
votes
0answers
14 views

OS X: destroyfvkeyonstandby question

This is a very OS X specific question. I don't know if it applies to the rest of the Unix family. Sorry if this isn't the best forum for it, but the users here appear to be more knowledgeable in ...
0
votes
2answers
43 views

Automatic extraction of zip files like in osx

In Mac OSX if you have downloaded a zip/gz/bz2 file, and you double click it in Finder, then the archive is automatically extracted for you in a subfolder, which I find very nice. I am wondering if ...
3
votes
1answer
101 views

Differences between dd in Mac OS X and Linux

When using Linux (Debian), I often use dd to copy a disk image to an SD card. I have written a script that throws an error if the device file specified in the "of" option is too large. This keeps me ...