The default Unix shell used by Terminal in Mac OS X

learn more… | top users | synonyms

3
votes
2answers
251 views

I deleted .bash_history, now history isn't saved anymore (although I re-created it)

I have freshly installed a new copy of El Capitan. I accidently deleted .bash_history, so I just did a touch .bash_history again, hoping this would solve the problem of my bash history not being ...
0
votes
1answer
206 views

OS X El Capitan: man, command not found

Today I was trying to update openssl in my MacBook Pro with El Capitan 10.11.2. I don't know where I made a mistake but it seems I have accidentally disabled man. In fact, if I launch man ...
1
vote
0answers
41 views

Chrome desktop apps (extensions) won't launch at startup on OS X

I'm trying to figure out how to get a chrome desktop app (Kiosk) to launch at startup. I've gone to System Preferences > Accounts > Login items and added Kiosk (User > Applications > Chrome Apps > ...
1
vote
1answer
24 views

Where is my .bashrc file in a dd image?

I created an "emergency" image of my entire HD using the procedure explained in Recover a dead hard drive using dd. I spent a lot of time fine tuning my .bashrc and .profile files, but I cannot find ...
0
votes
1answer
17 views

How can I hook up a PHP server?

I have a php page I want to test on a server. Is there a server that runs through Terminal.app that supports PHP? I read this tutorial, but either I did it wrong or it didn't work. How can I start up ...
1
vote
2answers
137 views

How to Poll USB mouse through terminal in El Capitan

I've been trying to view which devices are connected to my USB ports through terminal in El Capitan, in particular a USB mouse. I've read online that I can ls /dev/tty.* to view all connected devices. ...
2
votes
2answers
80 views

Bash history is not remembered in Terminal

My Bash history is remembered when I connect to my Mac via SSH, use iTerm2 or launch bash in the built-in Terminal app (every command I typed in bash is saved) but is not when I just use the built-in ...
0
votes
3answers
23 views

Retrieving the “Version” attribute of an OSX Application file via Bash

I was initially attempting to do this in Java using the UserDefinedFileAttributeView class but it turns out that is only available on Windows computers (This is being run on OSX) So I switched gears ...
4
votes
1answer
126 views

update_terminal_cwd demystified please?

I am trying to find the documentation on what, exactly, the printf command is doing in update_terminal_cwd. If you didn't know already, the update_terminal_cwd function is defined (at least on Mac OS ...
3
votes
1answer
70 views

xxd not found in Recovery Mode, Mac OS X 10+

In Recovery Mode, I was trying to access my password hashes, except bash 3.2 returned command not found for xxd. Any help would be appreciated.
0
votes
2answers
55 views

OS X command line installer track progress

I am trying to install an application through command line in OS X. This is what I am trying: hdiutil attach app.dmg cd /Volumes/appvolume installer -pkg app.pkg -target "/" This works fine, ...
1
vote
1answer
183 views

Trying to install Ant but getting -bash: brew: command not found

I have installed Homebrew using the code ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" it returns this inside the Terminal window ==> This script ...
9
votes
1answer
526 views

Terminal - how to restart session after inadvertently exiting?

Sometimes I inadvertently exit from a Terminal session (usually because I think I'm connected to a remote system, when I'm not), so I get to this point: How I can I restart the session at this ...
4
votes
1answer
83 views

Duplicating and renaming Finder selection to the same folder in one clean step?

Is such a thing possible? I have this code which can do the above: set now to do shell script "date +%Y-%m-%d' '%H.%M.%S" tell application "Finder" set finderSelList to selection as alias list ...
0
votes
1answer
28 views

Changing configurations for Jrnl

Greetings to the apple community. I'm a newbie to mac and the terminal and I have no previous exposure to Linux. I have only casually used computers. However I've been wanting to step up my game and ...
0
votes
2answers
83 views

Combine files by name and zip

How can I automatically ZIP files with same file names (different extensions) into one ZIP? For example I have four files king.jpg king.txt queen.jpg queen.txt which would led to king.zip ...
2
votes
2answers
75 views

DefaultKeyBinding.dict: Can I use it to rebind keys on OS X?

I need a custom keyboard shortcut for back slash \. I have created ~/Library/KeyBindings/DefaultKeyBinding.dict and put this in it: { "@ö" = ("insertText:", "\\"); } It is supposed to trigger ...
3
votes
3answers
720 views

Best way to check in bash if Command Line Tools are installed?

Using bash, I want to check if Command Line Tools are installed. Currently they are and when I will type xcode-select --install I get: xcode-select: error: command line tools are already ...
1
vote
1answer
20 views

How do I edit keyboard shortcuts in Nano?

Is there a way to edit the keyboard shortcuts in Nano? I would like to change Move to next word from Right: Ctrl + Space and Left: Alt + Space, to Alt + ← or →. According to this thread on ...
0
votes
0answers
24 views

“terminal-notifier.app is not open anymore”

From a .plist loaded to Launchd I run a bash script which displays a notification using terminal-notifier. The notification is displayed fine, but when clicked the message "terminal-notifier.app is ...
1
vote
1answer
327 views

How can I create bash_profile and bashrc [duplicate]

OS X 10.11.2 El Capitan I want to create some alias, so I go to ~/ folder and there is no .bash_profile or .bashrc. I have been looking for some info and I learn that .bash_profile is only read ...
0
votes
0answers
16 views

bit lost wrt to permissions and users

So I am installing postgresql and it mostly works, kinda. I have a user postgres that was create by the postgres createuser commmand. I understand that the intent is a do-nothing user that can just ...
0
votes
2answers
73 views

How do I make my Mac use .bash_profile to add extra paths after I statically set $PATH?

I, like an idiot, decided to export PATH=/usr/local/sbin/. After some googling I was informed that one should use a .bash_profile file in the root directory of your user which you can use to append ...
0
votes
0answers
27 views

MacTex: `Command not found`

The issue I just downloaded MacTex (link; I am on Mac OSX 10.11.1). After installing MacTex, I opened the LuaTex.tex example and tried to typeset it (after selecting LuaLaTex). The yellow window pops ...
1
vote
1answer
40 views

How to change JAVA_HOME with a Bash script

I have created a Bash script with the following line: export JAVA_HOME="/Library/Java/JavaVirtualMachines/jdk1.7.0_75.jdk/Contents/Home" 2> bash_errors.txt I have also made the file executable ...
1
vote
2answers
45 views

alias not working in terminal

I'm on a mac in Terminal. open -a "Sublime Text 2" opens Sublmine Text 2, just like I want it to. I now want to alias this to my .bashrc file, which I have an use for other things like prompt ...
0
votes
1answer
89 views

How to set the color of terminal text in ssh session exact same as local session?

So this is almost a copy from my previous question: Change output color of terminal (in Mac) to be different from typed text color for which I got a great answer here: ...
2
votes
2answers
699 views

Why bash history on my mac won't save?

I have always used bash for work, and never had problems with it. Now, it does not save any command in history again. If I open a window terminal, try some commands, it acts like everything has ...
4
votes
2answers
475 views

How to use cd with shell variable containing spaces

I am trying to create an environment variable for a path that is long, has a space, and syntax. I tried the following: export temp=/Users/username/Dropbox (Personal) And added it to my .profile. ...
6
votes
1answer
184 views

Change output color of terminal (in Mac) to be different from typed text color

I know how to change the color of ls output, but I would like to change the color of all terminal output. To make clear what I mean, below is a picture of my terminal. My text color is orange. ...
6
votes
4answers
312 views

Search for *.swo

I think this should be an easy one, but it's got me stumped. When I use the following, it finds the file. $ ls -al .bash_*.sw* -rw-r--r-- 1 damiensawyer staff 12288 27 Nov 07:39 ...
0
votes
1answer
74 views

Is there fuser -k <PID> analogue for Mac OS?

I want to kill process that runs at some port. In ubuntu I used fuser -k 8000/tcp. What is the Mac OS way? I found out this way: lsof -i tcp:8000 kill -9 But it's very long. I need one short ...
0
votes
0answers
79 views

Trying to install gnome-terminal on Yosemite

When I run gnome-terminal I get the error: (gnome-terminal-server:572): GLib-GObject-CRITICAL **: g_object_ref: assertion 'G_IS_OBJECT (object)' failed Here are my versions: Mac OS X - 10.10.5 ...
0
votes
2answers
147 views

What is the content of the $CLASSPATH variable in El Capitan?

I installed OS X El Capitan and, along with it, Oracle's Java 8 SDK. I've already verified that, using java -version, java is correctly installed. I need to add some user classes to the file path, ...
1
vote
1answer
136 views

How to get user GUI input from BASH scripts?

From a BASH script I want to get user input and change system settings, in a loop. I first tried cocoaDialog but that has a fatal flaw: the dialogs are always on top of other windows. Ideally, I ...
4
votes
2answers
274 views

How to access an external drive

I plug in a flash drive to my USB port. How can I access it through bash? ($ cd / takes me to the directory called Macintosh HD, but through Finder, I can go up one more directory called ...
0
votes
0answers
148 views

Why does setting CLICOLOR=1 not turn on colors for “ls”?

If I do ls -G, I do get the colors. From what I understood from the man pages, if I go into ~/.bash_profile and add export CLICOLOR=1 I would then get colors by doing just ls, as "This option is ...
1
vote
1answer
74 views

Bash script not working on Automator but working from terminal

I have this bash script that works perfectly on terminal #!/bin/bash for f in "$@"; do DIRNAME="$(dirname "$f")" filename=$(basename "$f") name="${filename%.*}" extension="${filename##*.}" ...
1
vote
2answers
56 views

How can I run an unsigned script in Automator

I can run the well-respected perl script exiftool from the command line in Terminal and achieve the desired result, but when I incorporate it in Automator as a Service I get a generic error message ...
2
votes
0answers
34 views

Grant rights on a certificate to an app through the shell

I'm currently looking for a way to grant an application rights to a certificate in my /Library/Keychains/System.keychain through the shell. I can currently do this through the Keychain Access App by ...
0
votes
0answers
32 views

Encrypt password on disk for scripting

In the Microsoft Windows platform, there is a service called the Data Protection API (DPAPI), which allows developers to easily encrypt and decrypt values using a simple set of APIs. The encryption ...
1
vote
2answers
130 views

VLC command works in Terminal but not Automator

If I run this in terminal it works fine /Applications/VLC.app/Contents/MacOS/VLC -I rc http://open.live.bbc.co.uk/mediaselector/5/select/mediaset/http-icy-mp3-a/vpid/bbc_radio_fourfm/format/pls.pls ...
6
votes
1answer
5k views

Missing .bash_profile and .bashrc files

I don't have .bash_profile or .bashrc files and I am definitely using the bash shell. I am using Mac OS X 10.11.1 El Capitan. How do I permanently modify my $PATH to cut down the default values Apple ...
1
vote
2answers
77 views

Prevent terminal tabs from auto-renaming

I like to name my tabs when I'm using Terminal so I can keep track of what's inside of them. I do this using the inspector. Unfortunately, whenever I ssh into a machine, my tabs get renamed. Is ...
1
vote
0answers
18 views

Automating VPN switching

I can us a VPN app like tunnelbear to appear to be in other countries, but is there a way to do this in a bash script or applescript? I want to be able to run automated tests on my iOS apps (in the ...
0
votes
2answers
163 views

How to re-install deb package from MobileTerminal (iOS) [jailbroken]

I am trying to run a command to re-install an already installed package. Here is what I see that gives me a clue that I am on the right path, but it doesn't install the package: su ****** apt-get ...
2
votes
1answer
30 views

Launch different apps based on file name (other than the extension)?

I'd like to have different apps handle .jpg files based on a naming convention I'll use for the .jpg files. Specifically most will go to Xee, but ones containing thumb should instead cause VLC to be ...
2
votes
1answer
682 views

Unable to set DYLD_FALLBACK_LIBRARY_PATH in shell on OSX 10.11.1

In shell scripts used for unit testing with dynamic libraries in a directory other than the typical @rpath, I have previously been able to set DYLD_FALLBACK_LIBRARY_PATH to set the directory ...
2
votes
0answers
70 views

Terminal hangs when title includes unreachable NFS path

[Edit: reframing to make the question more clear] I use the Mac Terminal to access remote linux systems. On the Mac, the bash prompt is set by: PROMPT_COMMAND='echo -ne ...
1
vote
0answers
30 views

-bash: 1: command not found - Immediately on loading Terminal [duplicate]

Upon loading my terminal (since trying to install composer globally) I'm being spammed with countless amounts of -bash: 1: command not found before I even type any commands. I'm not quite sure what ...