0
votes
0answers
11 views

Apple installer issue in terminal where -target keeps saying; error cannot find Volume

I am trying to use the Apple Installer commands to install a package and the output is that it was successful, however, the end result is that nothing actually happens meaning the package never gets ...
1
vote
2answers
16 views

Terminal window title rapidly changes when first opening

When I open a fresh terminal window, the title at the top has this format: [house icon][username]-[command]-[terminal size] The command portion of the title initially says login, then it very quickly ...
1
vote
1answer
58 views

How to get a fall-through behavior in case statements in bash v3?

I just tested the following syntax on Linux: case "$OSTYPE" in linux-gnu*) ;;& linux*) echo $OSTYPE; ;; esac case "$OSTYPE" in linux-gnu*) ;& linux*) echo $OSTYPE; ;; esac which works ...
0
votes
1answer
35 views

How to download images from an xml feed using terminal?

How can I download png images from an xml feed that looks the following way? <ListBucketResult xmlns="http://url1.com"> <Name>imagesToUse</Name> <Prefix/> <Marker/> ...
1
vote
1answer
228 views

-d option for split is illegal on OS X 10.9

I have bash script that works on Ubuntu but for OS X 10.9 i get the error for split command: split -b 1000000 -a 3 -d $F $F && rm $F || { echo "Error: 'split' command not installed" ; exit 1 ...
6
votes
1answer
52 views

Get ambient light sensor value from ioreg

I'm using the ioreg command line tool to try and read sensor information available on my computer (iMac). Particularly, I'd like to read the current value of the ambient light sensor. So far, I have ...
2
votes
1answer
56 views

How -exactly- do I remove a specific directory, from my PATH, in OSX, Mavericks?

Ok - so this issue has become somewhat of a white whale for me. I have browsed some of the questions here, but I cannot seem to figure out how to, very simply, delete a directory from my PATH. (I ...
1
vote
2answers
194 views

How to list bluetooth devices from command line

I have to list all available bluetooth devices from command line. I tried to google it, but got only results like "how to turn on bluetooth from terminal". Simply: bluetooth scan Thanks for help in ...
2
votes
2answers
180 views

make it easier to call often used terminal commands

I have a java tool that I use quite often from the command line but to use it I have to type java -jar dsim.jar. I want to make it so that I can call it just by typing dsim regardless of what ...
2
votes
2answers
44 views

History commands render incorrect on Bash Vi mode

I'm having this werid and really annoying issue in bash vi-mode. Env: Mac 10.9.2, iTerm 2 1.0 or Terminal.app, $TERM={screen-256color|xterm-256color|xterm|vt} Repro steps: Run some long commands ...
0
votes
0answers
23 views

Automatically copy PDF.plugin to Chromium.app

I'm using Chromatic.app to update my Chromium.app recently. I'd like to use Chrome.app's PDF.plugin in Chromium.app. Therefore I need to copy PDF.plugin to the following directory: ...
8
votes
2answers
8k views

Why Mac OS X don't source ~/.bashrc [duplicate]

I found a lot of people figuring out why instruction similar to this : Put X to your ~/.bashrc and you can do Y don't work. It always turns out that Mac OS X's bash's startup files (or Mac's ...
0
votes
1answer
91 views

What is the proper way to use the cut command on ps command output

This question is related to a question I posted on rogue firefox procesess. It relates to firefox processes following image uploads that I have been having for a while. I am trying to get to the ...
8
votes
2answers
190 views

Piping multiple commands

I would like to run the following command and pipe stout of both to TextEdit: pmset -g; echo; pmset -g assertions | open -f -a TextEdit This doesn't work, it only executes the latter: How?
1
vote
1answer
158 views

Locating an app by its bundle identifier from the command line

I am looking for a way to find an app's location on the system from the command line using its bundle identifier. I can open it like this: open -b 'com.zerotier.ZeroTierOne' ... where ...
0
votes
1answer
351 views

In iTerm, why is a command shell's command not picking up things on my $PATH?

I've got a script in my ~/.bin directory that changes iTerm's background before starting an SSH session (as detailed here, script slightly modified from this version). If I start a regular login ...
0
votes
2answers
42 views

wacked a directory from the command line

I was copying a file to /usr/local/bin from the commandline on a Snow Leopard Server 10.6 ... anyhow i typed the following ... sudo cp ./le /usr/local/bin Ouch ... that missed last forward slash ...
0
votes
0answers
14 views

How to create aliases in the terminal? [duplicate]

I tried two methods: With nano created a ~/.bashrc file in which stored my aliases from linux mint, after used source command and after it all work fine until i exit the terminal. Found in the ...
0
votes
1answer
2k views

Mac OS X Terminal: -bash: $: command not found

While trying to install pagekite on OS X Snow Leopard using the following command: $ pagekite.py --signup I got: -bash: $: command not found I am a noob with the terminal but after reading a bit ...
0
votes
0answers
33 views

Why nc doesn't response even if the “w” option set?

For some servers: nc -w 1 -z x.x.x.x 22 doesn't work. It has no response, but is looking like very busy: only ctrl + C can help. So -w 1 seems to be a useless option, to specify the timeout. Does ...
2
votes
3answers
3k views

Change file association in terminal?

Is there a method for associating file types with applications via terminal? I thought ~/Library/Preferences/com.apple.launchservices.plist might do it, and I also have seen: Why is a command line ...
0
votes
1answer
871 views

How to enable Maven autocomplete on Mac OS X command-line?

When using Maven (mvn) on OS X Terminal, how can I get tab-completion for Maven goals, plugin names, etc? Things like this: mvn pa [TAB] -> mvn package mvn je [TAB][TAB] -> mvn jetty:run
1
vote
3answers
1k views

Find/Unrar/Delete Script

I'm a PC convert, and quite novice when it comes to shell/bash scripting, but I really want to learn/understand more. My need: I need to be able to scan a folder, find any .rar files, extract the ...
6
votes
2answers
638 views

“Airplane Mode” in OS X. Alternative command for `rfkill`?

This question is an exact duplicate of this post from superuser.exchange.com. I believe this is a valid question for both of sites and hope I am not (if any) violating stackexchange policies. ...
2
votes
1answer
271 views

Paste <TAB> into Mac OS X command line

I want to paste <TAB> into command line, in order to execute cut command with <TAB> as the delimiter. Everytime I try to do it, it simulates clicking the tab key and completes the command ...
3
votes
2answers
320 views

How to drop a file onto a GUI app from command line?

I've got a tool to normalize WAV audio files, but it only works by dragging and dropping the file either onto the GUI or onto its dock's icon. As far as I know the app doesn't have any option to pass ...
0
votes
3answers
406 views

I have lost the prompt on Terminal on my Mac; unable to get commands to work

I was trying to launch a few Java applications using the terminal. The command that I was instructed to launch it with (I was following a guide) was the following: #!/bin/bash cd "$( dirname "$0" )" ...
4
votes
4answers
9k views

Change Command Prompt - Variables are literal, and changes to .bashrc or .bash_profile not making a difference

Trying to change my command prompt in OS X 10.8 / Mountain Lion. Changes to ~/.bashrc and ~/.bash_profile do not make any difference. Like: export PS1="\W \$" It defaults to the host name ("\h\%"). ...
1
vote
3answers
112 views

At the command line, how can I 'arrow along' faster using words instead of chr's

I am at the command line and I have . /this/set/of/directory/this_command "parm1", "parm2", "parm3" When I 'up-arrow' to recall previous lines, how can I move along the line from "word to word". ...
46
votes
3answers
18k views

git auto-complete for *branches* at the command line?

On my linux machine I have autocomplete for branches with git. For example I can type git checkout [TAB] and get a list of branches. Or I can type git checkout feb* [TAB] to get all branches that ...
0
votes
2answers
623 views

Executing program through Terminal

I have Sage (math program) and I want to execute it through terminal. I know I can go to the directory and execute it with - open Sage.app But would I really want to do is simply type sage in ...
2
votes
1answer
506 views

Why doesn't the screen command source my .profile?

When I start a new screen, the aliases that I have set in my ~/.profile do not seem to be sourced. Does anyone know where I can change this or which file is actually read when starting a new screen?
11
votes
2answers
1k views

cd to a directory by typing its name?

For example if a directory 'blob' exists and I just type 'blob[return]' then the system cds into the blob directory for me. In Linux (Ubuntu) I can add shopt -s autocd to my .bashrc file, but on OS X ...
4
votes
1answer
349 views

Why does my Terminal command line screw up like this? (bash's fault?)

When I use the command line history ( CtrlR , CtrlP ) The command line screws up like this: The cursor is supposedly located at the end of the line ( just pressed CtrlE ) If I press enter, just ...
7
votes
2answers
2k views

What is the difference between .bash_profile and .bashrc?

To make an alias for the Terminal in OS X, you can either put the aliases in .bash_profile or .bashrc. What is the difference between the two and why would I choose to put aliases in one and not the ...
5
votes
1answer
2k views

Why is a command line change to ~/Library/Preferences/com.apple.LaunchServices.plist not effective immediately?

When the Info window of Finder is used to associate files of a particular type with an application: the preference is effective immediately. When Terminal is used to make a comparable addition ...
1
vote
1answer
335 views

Correct syntax for bash grep function?

I'm trying to set up a function to make certain grep command easier. gr() { grep -r --include=*.\{m,h,xib\} $1 \* ; } The end result should be a recursive grep of all *.m, *.h, and *.xib files, for ...
2
votes
1answer
401 views

Mac Terminal: emacs-style command editing messed up

This has been a "quality of life" issue for me for a while now- command-line editing in the Mac terminal is messed up for me. If I type a few chars, and then hit CTRL-A to move to the beginning of ...
1
vote
2answers
359 views

Rsync Backup Script

I'm having some issues backing up some data. Basically, I have FileVault enabled on my Macbook Pro and want to backup a folder I use - however, I don't want to use Time Machine (at work, I have one ...
10
votes
4answers
1k views

Updating modifier key mappings through defaults command tool

I am trying to automate the inital setup of my macbook, that includes installing software and changing OS X configuration to my needs. I have tried to update the modifier keys with defaults, the ...
37
votes
8answers
68k views

Why doesn't .bashrc run automatically?

I put some alias commands in my .bashrc file, so that they might be loaded everytime I open a new Terminal window. Yet this doesn't happen. I have to select run script: in the ...
3
votes
3answers
8k views

Netcat -e on Mac OS X

I'm a newbie macuser coming from Debian, and I'm a big command line user. One one my preferred one is netcat (aka nc on mac). I especially loved the -e option which enabled to create a process that ...