The default Unix shell used by Terminal in Mac OS X

learn more… | top users | synonyms

1
vote
1answer
124 views

Vim like terminal

I recently discovered terminal's feature, you can set the keys emacs or vi style I prefer the second. so if you do set -o vi You can use k j l h keys to navigate on the command line. And you can ...
0
votes
1answer
73 views

What is the best way to migrate a .bash_profile to Mavericks

I have a pretty extensive .bash_profile set up on my older machine using Lion and I would like to include a lot of the same functionality. I noticed that Mavericks doesn't have a .bash_profile by ...
3
votes
1answer
256 views

How to restore my deleted .bash_profile?

I have deleted my .bash_profile with rm command and copied another one to use. But now i remember there is some PATH thing in the previous file :(. Can i find the deleted .bash_profile in some place ...
1
vote
1answer
74 views

How to share .bash_profile between different users in the same group? [duplicate]

I have searched by google but cannot find a right solution.The scenario is like this: in my mac, there are two users, lets say user1, user2. these two users are in the same group, which is staff ...
1
vote
1answer
73 views

Automator get first 3 letters of parent folder

How do i get the first 3 letters of the parent folder im creating a folder in with automator im designing a Automator service to create a project folder in the folder of a client and I want to append ...
0
votes
1answer
85 views

How is $PATH created?

I am still relatively new to the workings of the Mac OS but have extensive knowledge of Linux. I updated my php on Mavericks using the php_osx and the instructions stated to use export ...
2
votes
1answer
387 views

Forward slash doesn't work when in terminal… works in every other application

I'm trying to use terminal and in every tab I open, when I try to change directory such as cd / I get a beep and am unable to type the character. I am on the same computer and am able to ...
0
votes
1answer
18 views

Deleteing Original File After Creating Another

Here is the Script I have so far: #! /bin/bash dd=$(date -v -1d '+%Y-%m-%d') for file in *.csv ; do saveName="${dd} - TF.csv" cut -d',' -f5,8 "$file" > "$saveName" done The file ...
0
votes
1answer
170 views

Rsync exclude-from not working

I have created a rsync script which has been working fine until I made recent modifications adding exclude-from clause to it. When running the script it returns the following error: rsync error: ...
1
vote
1answer
237 views

Root crontab won't save

I'm trying to add a crontab entry to my root user's crontab. I'm able to add an entry without issue to my regular user's crontab, but when I su to root user and try adding a crontab entry it does not ...
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: ...
2
votes
2answers
321 views

Does Mac OS X's bash read scripts for all users (tab-completion scripts) from /opt/local/etc/bash_completion.d path?

I stumbled upon some instructions in the book "Pro Git" It suggests: Download this file : https://github.com/git/git/blob/master/contrib/completion/git-completion.bash If you use the Bash ...
1
vote
0answers
139 views

What is multi user mode in MAC and how to boot in multi user mode in MAC Mavericks [closed]

What is multi user mode in MAC operatins system and how to boot in multi user mode in MAC Mavericks
9
votes
2answers
10k 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
2answers
116 views

Can't open a file in sublime text using bash_rc

My bash_profile function looks like: function st() { /Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl /Users/ishan/workspace/nltk_engine/index.py;} However, when I do st in terminal, ...
0
votes
1answer
97 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 ...
2
votes
2answers
117 views

How do I change $PATH and set it to the default directory?

For some reason when I run echo $PATHI get the following directory: /Users/<home>/Library/Applications/. How do I set it back to its default location so that I don't have to run this command, ...
5
votes
1answer
7k views

Mac OS X Mavericks - add to path

I'm trying to set up a phonegap project and while trying to add a platform it outputs the following error: Error: The command "android" failed. Make sure you have the latest Android SDK installed, ...
2
votes
3answers
139 views

Behavior of login shell vs. Linux, 'sh -c'

I have a seemingly-valid command that works fine on Linux boxes but fails on OSX, and I would like to know why. sudo su - validusername sh -c 'whoami' On Linux, this will echo 'validusername' on ...
0
votes
1answer
866 views

TERMINAL ~/.profile does not contain source ~/.bashrc MAC OSX 10.9.1

terminal shows below on this stage on gerris installation page : http://gfs.sourceforge.net/wiki/index.php/Mac_OSX_Installation Note: make sure that the file ~/.profile contains the line source ...
1
vote
1answer
70 views

How to find out which terminal app (iTerm or Terminal) is running from within bash

I need to have different color schemes for each of the two terminal types I use. I can set it in the .bash_profile as mentioned here. But how can I tell it to differ depending whether its a iTerm2 or ...
3
votes
1answer
4k views

`LSOpenURLsWithRole() failed with error -1712 for the file </path/to/folder>` when I attempt `open .`

I suddenly came across this error when I attempted to do open . to open the current directory in Finder, a command that I use quite frequently: ysim:~/Downloads$ open . LSOpenURLsWithRole() failed ...
0
votes
1answer
203 views

In Terminal, when the the “cd” command is called, libwww-perl's “head” command is also executed

Currently, in Terminal, when I execute a cd command, it also executes LWP's head command. A copy of the Terminal output follows: laptop:bin user$ cd ~ Unknown option: n Usage: head [-options] ...
1
vote
2answers
86 views

Combine two bash find commands

I have two similar find commands that I basically have the same code for both once the while loop begins. I want to combine them so I only need one find to search through files and directories, ...
8
votes
2answers
201 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
287 views

Remove special characters and replace space with _ from files and directories Recursively in Bash

I have a script that is giving me some problems, I know that I have to re-do it recursively but am having some trouble. The script should rename all files and folders in a given folder by removing ...
0
votes
1answer
831 views

Find files modified today, using command line (bash)

As we all know, despite being named "Finder", the Finder is virtually useless at finding files. In Mac OS X 10.6 (or any version), how can I use the command line (bash in Terminal) to find files ...
10
votes
2answers
9k views

Using terminal to get current fan speed?

I would like to view the current fan speeds of my MacBook and iMac using terminal. I've found that running spindump then cat /tmp/spindump.txt | grep "Fan speed" will show it, but that's very slow and ...
0
votes
2answers
2k views

Set the master password from terminal

I am trying to set a master password from the terminal (using a shell script). I see the passwd function and the master.passwd function, however I don't see any documentation on either of these to set ...
1
vote
1answer
627 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 ...
2
votes
1answer
908 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 ...
2
votes
3answers
1k views

Find all executable files within a folder in terminal

I have a folder myfolder that contains a huge hierarchy of files/folders. How to find all executable files within this folder? On Ubuntu this works: find . -executable -type f But Mac OS X Mavericks ...
3
votes
1answer
77 views

Log software usage time on Mac OS 9 (Oct. 1999)

I'm needing to log the time a user spends inside of an application in Mac OS 9. I created a simple bash script "launcher" to do this, but then discovered OS 9 doesn't have bash installed. Here is the ...
2
votes
2answers
230 views

Terminal.app equivalent of `xterm -e 'cmd'`

With xterm (and gnome-terminal, terminator, etc), you can run the following command: $ xterm -e 'vim somefile.txt' xterm will open and run the specified program (in this case, Vim). When the ...
1
vote
1answer
198 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 ...
1
vote
2answers
235 views

What options does Terminal pass to bash on startup?

In the Terminal preferences, I'm able to configure the Terminal to "Open shells with:" -> "Command (complete path):" /opt/local/bin/bash. What options is the terminal passing when invoking this ...
2
votes
1answer
188 views

Bash Terminal keeps showing “No such file or directory” at startup

-bash: /Users/MarksMac/Library/Enthought/Canopy_64bit/User/bin/activate: No such file or directory Basically, how do i remove the above error? I am using a mac 10.9.1 I have tried looking up ...
2
votes
2answers
181 views

Why isn't `history -a` working?

I am working under OS X 10.9.1 (Mavericks), using Terminal, which reports that it is GNU bash, version 3.2.51(1)-release (x86_64-apple-darwin13) I noticed some weird issues where history was not ...
0
votes
0answers
58 views

Opening Terminal shows a list of ttys - unable to use

Having the latest Mavericks installed, I tried to update PATH using nano and creating a .bash_profile file. I'm not sure what happened, but now when trying to run Terminal all that shows is a list of ...
0
votes
0answers
36 views

Cannot return to EOL after leaving in Bash vi mode

In terminal, after leaving the EOL in bash in vi mode, I cannot return to it, which makes it quite annoying to delete the last character. To replicate, with blank bash_profile and inputrc, set ...
5
votes
5answers
1k views

OSX Bash for loop - issues with spaces in folder names?

I'm getting a bit confused on how to handle spaces in path names when returned in a for loop. Rationale: I'm cleaning up the permissions on folders and files that I copy over from Windows. Most of ...
1
vote
1answer
101 views

Add color to custom ls alias

I created an alias to display permissions in octet format: alias lso="ls -l | awk ' { k=0; for (i=0;i<=8;i++) k+=((substr($1,i+2,1)~/[rwx]/)*2^(8-i)); if (k) printf("%0o ",k); ...
1
vote
1answer
62 views

Mavericks - strange behavior creating simlink in root directory

I want to create a simlink called /home, that points to /Users. The command sudo ln -s Users home (executed in /) should work; at least, I've demonstrated that the syntax is correct by creating a ...
1
vote
1answer
79 views

What could be preventing my backup script from running?

I'm having trouble getting a simple backup script to run. The following script runs most of the time, but occasionally it fails entirely (without printing out any log information). Is there something ...
1
vote
2answers
688 views

Hidden login script

I have a bash shell script that runs on login. Even though I selected the "hide" checkbox in system preferences, iTerm still shows while running it. How do I completely hide it?
0
votes
0answers
9 views

How can I customise the Terminal.app prompt [duplicate]

I have been using Terminal with xterm-256color emulation. I want to set the prompt to display the current directory in colour, as I used to under Linux. I have set the PS1 environment variable, but ...
2
votes
2answers
132 views

How do I link/call an actual shell script saved within an Applescript app?

What's the correct syntax in the Applescript below to make this app run by double clicking on it rather than how it runs now by just running the Applescript in the AS script editor? The Shell script ...
1
vote
1answer
137 views

Trying to remove files listed in file with AppleScript with do shell script call

The following code is an example of what I'm using at the moment, but it keeps erroring out on me: do shell script "find /Applications -name 'Bingo.app' > /tmp/remove_files" with administrator ...
0
votes
1answer
400 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
123 views

messed up .bash_profile while configuring PostgreSQL

I am quite new to Terminal use. While installing and activating a local PostgreSQL server on my MacBook Pro (OS 10.6.8) I definitely messed up my .bash_profile (probably by messing around with user / ...