The default Unix shell used by Terminal in Mac OS X

learn more… | top users | synonyms

2
votes
3answers
2k 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 ...
34
votes
8answers
58k 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 ...
8
votes
2answers
2k 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 ...
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
6k 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
872 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 ...
11
votes
6answers
1k 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
488 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
613 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
199 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 ...
0
votes
2answers
913 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 ...
26
votes
3answers
9k 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
2k 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
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?
1
vote
1answer
176 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
347 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
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
334 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
211 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
58 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
402 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 ...