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

“login -qf” as root results in “Login incorrect” error

I'm trying to install pow on an OS X machine.* Some of pow's components have to run as root, so part of the setup process involves running an installation script with sudo. The problem is, this setup ...
2
votes
1answer
29 views

Can't use `od` command with directories

I'm trying to use the od command in a directory in OSX but it doesn't proceed and it results in the error message: od: .: Is a directory Could you please help me with it or any equivalent command? ...
2
votes
1answer
15 views

How to make PATH variable exports on MacOSX persistent?

I do export http_proxy=http://proxy:8080 export ALL_PROXY=$http_proxy on my Mac. Brew for instance relies on these settings. How can I make these settings stick between power cycles? Is this the ...
0
votes
1answer
25 views

Installing PHP on OS X. Syntax errors?

When installing OS X on Yosemite with curl -s http://php-osx.liip.ch/install.sh | bash -s 5.6, I get the following: **** [WARNING] Detected OS X Yosemite 10.10. As this is quite new, there may be ...
0
votes
0answers
39 views

ssh: connect to host 104.131.76.121 port 10222: Connection refused

I have been trying to solve this problem for quite some time. The error is in the title. The server is a digitalocean ubuntu 14.04. It was working before hand. I changed the ServerAliveInterval on ...
1
vote
6answers
122 views

How to convert dashed string to spaces and caps?

Given the string foo-bar, what is a good way to convert it to Foo Bar? Using Bash, OSX.
0
votes
0answers
11 views

Why do I get a “preauth required” error when I set “require-preauth = false” in krb5.conf?

On an OS X machine, I'm trying to get a kerb ticket on my organization's kerberos realm. I grabbed a copy of krb5.conf from a Linux machine to make sure my kerberos configuration was correct. I tried ...
1
vote
1answer
30 views

MacOS X Mavericks running VirtualBox cannot communicate with Linux VM

I have a MacOS X Mavericks host running Vagrant using VirtualBox as a provider. I have experienced several times that with different VMs (particularly Ubuntu Linux VMs) after the first time the VM is ...
0
votes
0answers
17 views

Why are some processes “killable” by pkill but not killall?

I had over 20 instances of httpd (apache) processes running, so I decided to shutdown these. Normally I use killall, But when I typed killall httpd it just said: No matching processes belonging to ...
1
vote
2answers
34 views

SSH Tunneling Through a Firewall to a Cluster

I work at a university but I often work remotely. There is a cluster computer at the university that I need to be able to interact with, but its behind a firewall. Let's call the firewall F and the ...
1
vote
1answer
21 views

Symlink all files in a directory with the entire directory tree

Right now I use this ln -s /dir/* /dir2/ Which will symlink everything, but I have to go inside the dir and make a new directory because the folders are also symlinked (this is expected). So here ...
0
votes
1answer
42 views

Is hardware helping reducing crashes of OS X? [closed]

I am taking an OS course this semester, and we mentioned that device drivers can cause about 85% of crashes(for Windows). My understanding is that: since many personal computers are configured with a ...
1
vote
1answer
27 views

Compare directory trees regarding file name (and size and date)

I want to check the results of a restore from backup. This is, because TimeMachine on MacOS gives me some weird errors and warnings and I want to make sure, everything is in its place again after ...
1
vote
2answers
51 views

How to execute Mach-O 32-bit C++ program on Linux?

I want to execute a program (which I know was written in C++), but I get this error: zsh: exec format error: ./myProgram Output of file myProgram: myProgram: Mach-O i386 executable My system is ...
0
votes
0answers
13 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
41 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
25 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
65 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
126 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
28 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
62 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
143 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
27 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 ...
1
vote
1answer
89 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
42 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
67 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
41 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
588 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
32 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
38 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
17 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
49 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
16 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
15 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
52 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
60 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
860 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
44 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
63 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
86 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
71 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
81 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
39 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
171 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
34 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
50 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
53 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
96 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 > ...