The default Unix shell used by Terminal in Mac OS X

learn more… | top users | synonyms

8
votes
2answers
7k 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 ...
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 ...
36
votes
8answers
66k 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 ...
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 ...
7
votes
3answers
7k views

Change Terminal.app's Default Shell to BASH

How can I change Terminal.app's default shell to BASH? For some reason, my friend's Mac (10.6.6) defaults to using TCSH instead of BASH. The obvious remedy is to choose /bin/bash as the command to ...
11
votes
2answers
995 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 ...
8
votes
3answers
15k views

Getting files, all at once, from a web page using curl

I would like to download the files, all at once, from the following page using curl: http://www.ime.usp.br/~coelho/mac0122-2013/ep2/esqueleto/ I tried curl ...
11
votes
7answers
2k views

Is there a bash command to check to see if Time Machine has finished backing up?

I'm writing a script that will rsycnc my Time Machine directory to a remote server using ssh. I've switched from a shell script to an AppleScript and then back to an Apple script and I don't really ...
5
votes
1answer
2k views

How can I reset my bash configuration?

When I open Terminal it shows this: Last login: Fri Apr 1 17:04:59 on ttys000 -bash: export: /opt/local/bin': not a valid identifier -bash: ...
9
votes
5answers
536 views

How to share .bashrc files between two mac user accounts

I have set up two user logins on my computer, one for home and one for work. I would like to be able to share any of my bash and vim settings between the two users. Is there anyway to do this? Thus ...
3
votes
2answers
1k views

How do I make invisible files (like bash profile) visible in the finder?

question is in the title. There's some files that most Apple users don't need access to, but if you program you do need access to. in particular the bash profile. anyone know how to make these visible ...
2
votes
4answers
696 views

List the extensions installed in Safari for Mac OS X, and state whether each one is enabled

I'd like a list, from which text can be copied. (Not a screenshot of preferences.) This information does not appear in any of the following: Safari System Profiler in Snow Leopard System ...
1
vote
1answer
222 views

Alt-. and vertical bar (pipe) on terminal

On linux consoles I always use Alt + . to get the last argument of the previous command in history. for example if I had ls /tmp/test as last command, and if I type rm Alt - this will result ...
1
vote
2answers
1k views

iTerm2 terminals close immediately with “argpath=login error=No such file or directory”

Whenever I try to open a new terminal window in iTerm, it closes right away after displaying this: ## exec failed ## argpath=login error=No such file or directory Does anyone know what is causing ...
42
votes
3answers
17k 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 ...
28
votes
3answers
11k views

Is bash in OSX case-insensitive?

Are bash commands on OSX case insensitive? I type "which TR" and it shows /usr/bin/TR, though there is no such binary there. Same thing for other binaries, when capitalized. Or is Terminal.app maybe ...
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 ...
3
votes
2answers
3k views

Bash commands that work on an iphone

I've jailbroken my phone, and I'd like to execute some commands on it from my phone, namely, the Say command. That, unfortunately, does not work. What commands COULD I execute on the iphone, other ...
6
votes
2answers
3k views

Is there a Mac OSX equivalent of zenity?

I'm porting some simple X windows/bash scripts to Mac OSX, but I cannot find a build of Zenity (a Gnome app for basic GUI dialogs) for OSX. Is there some other command line driven dialog utility I can ...
5
votes
2answers
734 views

What does -HUP do when used with killall?

Sometimes when I'm running a killall command from Terminal, a co-worker would suggest or edit my scripts to show killall -HUP. What does the -HUP part do?
5
votes
5answers
4k views

How do I restore my .bash_profile?

I've accidentally overwritten my ~/.bash_profile file. Does anyone have a "sample" one I could copy, or know where I might be able to find one?
2
votes
2answers
1k views

Changing terminal color

I would like to know how to change the terminal color, so whenever I run ls it will return the name of: Directories in red Files in blue Executable files (those you do ./file) in light green How ...
1
vote
1answer
405 views

Setting a firmware password

Currently trying to use a script (preferably shell) to setup the firmware password on a fresh OSX install. I obviously found this: http://osxdaily.com/2014/01/06/set-firmware-password-mac/ which ...
1
vote
1answer
598 views

Using bash/terminal to get number of battery recharge cycles

I would like to get the number of recharge cycles using bash (terminal commands). I understand the following command will display all of the battery data, but I want the cycle count on its own ioreg ...
1
vote
1answer
367 views

How can I set Last Modified Date of file after using HandbrakeCLI to convert a file?

Running this on OS X Lion. I'm batch converting several hundred home movies using Handbrake CLI. I'd like to set the last modified date and created date to that original file. I'm using the ...
6
votes
2answers
690 views

Change my shell to a different bash version at /usr/local/bin/bash?

How can I set my /usr/local/bin/bash (which is the 4.2 version that allows auto-completion of 'cd to directory with directory name') to be my default bash for a new window instead of my regular ...
6
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 ...
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
2answers
649 views

My Automator Workflow fails because it fails to find the git command within the 'Run Shell Script' command? Need help

I have an Automator workflow and one of the actions is to clone a repository. Here's the code for the 'Run Shell Script' action. The command is run within the Bash shell /bin/bash if that matters: ...
1
vote
2answers
374 views

Terminal and bash can't start with libiconv error

I just tried to start Terminal.app in Mac OS X 10.6.8, and got the following error: dyld: Library not loaded: /opt/local/lib/libiconv.2.dylib Referenced from: /bin/bash Reason: Incompatible ...
1
vote
1answer
236 views

How can I make autocomplete in the shell work with case-folding?

How can I make the autocompletion for files and folders in the bash shell work case-insensitively? Ideally, cd ~/doc + tab autocompletes to cd ~/Documents (correcting the case as it autocompletes), ...
1
vote
1answer
1k views

Mac OS X Terminal [Use option as meta key] overrides backslash in spanish keyboard

I already posted this question in stackoverflow: http://stackoverflow.com/questions/4811282/mac-os-x-terminal-use-option-as-meta-key-overrides-backslash-in-spanish-keyboar but I was informed there ...
0
votes
1answer
1k views

Nokogiri gem fails to install in OS X Mavericks

Install fails showing: checking for iconv_open() in iconv.h... no checking for iconv_open() in -liconv... no checking for iconv_open() in -liconv... no checking for libiconv_open() in iconv.h... no ...
0
votes
1answer
84 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 ...
0
votes
3answers
1k views

Change owner for all files owned by x

I copyied files from my MacBook, mainly files from /usr. The one and only user on my computer is called 'Julian' (like on my MacBook). A lot of the copied files are now owned by '501' (id of "Julian" ...
0
votes
1answer
455 views

Allow the Terminal.app to pass command key based keystrokes to terminal programs

I want to allow programs running in the terminal the ability to interpret the keyboard short cut Cmd + S I have already Remapped the Terminals' default binding of Cmd + S to Ctrl + S via the ...