questions narrowly about terminal.app alone should use this tag. Please consider using **command-line** for any question not specifically about the native terminal app

learn more… | top users | synonyms

5
votes
2answers
397 views

grep: command not found

This is a very weird behavior. Lately, whenever I am trying to find a process on console with ps aux | grep foo, it is returning a grep: command not found. Ok, that could be something that I changed ...
0
votes
1answer
53 views

How to get iTerm to properly send the CTRL-. sequence?

Emacs uses a lot of C-. and similar keyboard sequences. iTerm doesn't send the key sequence C-. itself, but I've found that I can map C-. into an escape sequence or hex code or text in iTerm's ...
4
votes
2answers
33 views

Change terminal color for each tab

I work on a lot of tabs in terminal at a given time. Sometimes, I get tabs mixed up and accidently run commands on tabs I am not supposed to. To simplify this, I wish to write some script, that on ...
1
vote
2answers
3k views

Playing alert sounds from terminal

Is there a way to play OSX alert sounds from terminal? The alert sounds that are listed in System Preferences > Sound > Sound Effect Tab
4
votes
2answers
262 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 ...
3
votes
1answer
40 views

Why is the host name in the shell prompt “MacBook-2” instead of “MacBook”?

I opened Terminal on my MacBook Pro and the prompt read MacBook-2:~ myName$. Is there something wrong? Do I need to be worried about this? Why "-2"? Thanks in advance.
1
vote
1answer
139 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
68 views

Sending F5 keystroke using iPad Pro Smart Keyboard

I have got an iPad Pro that I am using with Apple Smart Keyboard. I want to use it to write latex file using Vim editor. I use Vim in a server which I connect to through SSH using an application ...
3
votes
3answers
204 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 ...
4
votes
1answer
39 views

How to manually add ssh key to keychain?

In the past year I've been using dsa keys to access several remote machines. On one of these machine, dsa keys have been deprecated so I simply switched to rsa. In doing so it seems that my key is not ...
0
votes
0answers
12 views

Disk's Volumes corrupted when shutdown during synch

I've had this issue for quite a while I had a Windows Dualboot. When running OSX, and when Dropbox is synching, when shutting down to boot into Windows, the disk where Dropbox was synching to gets ...
0
votes
2answers
37 views

Can't ssh into another mac on same network, wrong password

I've got two macs on my home network, both are enabled for Remote Login. From mac1 I open terminal and enter "ssh mac2.local". I am prompted for the password but the when I try the password I use ...
3
votes
1answer
34 views

How do I type a tilde in spanish keyboard?

It is difficult work with the Terminal if you can't type the tilde. Does anybody know how to do this using a Spanish keyboard?
1
vote
2answers
3k views

How can I use Atom as the default editor for “open”?

I would like to set Atom as my default editor for open. In order to do this, I set in my .bashrc: export EDITOR="atom -nw" and reload the file with source .bashrc. Anyway, when I try to open a ...
1
vote
1answer
17 views

How to define a shortcut for OS X terminal using Shift-PageUp?

Using the system settings, I tried to re-map the keyboard shortcut for previous and next page from Cmd-Pageup/Dn to Shift-Pageup/Dn. However, the system settings dialog for shortcuts does not seem to ...
6
votes
3answers
680 views

How to search for a file by a hash value with bash script (terminal)?

I am writing a script for Mac OS X Lion 10.7 and I would like to know how I can search for files based on their SHA1 hashes. I would like to search the whole file system for the file(s) I will be ...
2
votes
2answers
84 views

Wrapping youtube-dl into automator via applescript

I am hoping to make an automator application that prompts the user for input (i.e. youtube url), and downloads it using youtube-dl (already installed via Homebrew). After this, I am trying to use the ...
1
vote
1answer
9 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
1answer
147 views

iterm + tmux isn't allowing me to scroll up with the mouse

I recently rebuilt my system and everything works except I can't scroll my (iterm2) terminal window back to look at commands and output that have scrolled off the screen. Without tmux I can scroll ...
0
votes
0answers
74 views

How does OS X detect a PowerPC application?

I use an application called Anki for learning foreign languages and professional terminology. This app creates a default folder in /Users/user/Documents/Anki, which I did not want. You can circumvent ...
0
votes
1answer
35 views

Setting up bash_profile but alias not found?

Trying to set up my bash_profile but I don't know what I'm doing wrong. touch ~/.bash_profile And... open ~/.bash_profile Save and close the .bash_profile. Then close and re-open Terminal and ...
0
votes
2answers
224 views

problems installing homebrew on mavericks

I tried to install homebrew (OSX 10.9.5) using the recommended ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" but got Illegal variable name. I do have ...
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
0answers
30 views

xterm settings lost after update to El Capitan

I mostly use my laptop to run a browser and lots of xterms. This morning I took the plunge to El Capitan, and now all my xterms look like they did before I did any customizations. I recall that ...
1
vote
1answer
27 views

Is there a way to change the font color of the current path in termial? [duplicate]

I'm styling my Terminal and what I need is to change the color of the path, if you still don't understand what I mean, here's a pic: There you can see the shaded area (Jonathans-MacBook-Pro:~ ...
0
votes
1answer
343 views

External disk - Unrecognized file system (-69846)

I have an external storage with 2TB that was working nicely. But since last week, when I unplugged the USB before eject it, the disk is not readable anymore. When I insert USB, I can actually see ...
0
votes
0answers
14 views

Terminal command that causes the Finder to stop and not relaunch [duplicate]

I am looking for a terminal command that causes the Finder process to stop and not automatically restart itself. The command killall Finder will cause the Finder to just relaunch.
1
vote
4answers
353 views

Mac terminal can't be used after set up of ~/.bash_profile

I was installing Apache Ant earlier and once I did, I also ran: touch ~/.bash_profile nano .bash_profile Within that text file I wrote: . .bash_profile saved, exited, then ran: source ...
0
votes
2answers
50 views

How to split screen in TotalTerminal to end up with two terminals?

Often when you have ssh'ed into a server, you could like a second terminal to continue right off there, without having to ssh again. I know that iTerm2 can do it, but it feels buggy on multi screens. ...
1
vote
2answers
19 views

How do I search quickly in iTerm 2?

When searching in iTerm2, some kind of of fancy live highlighting thing seems to kick in even before you hit enter. When the scrollback buffer has more than a few thousand lines in it, this search ...
0
votes
1answer
44 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
1answer
45 views

Any way to remove all folders that contain only .DS_Store recursively?

If I try sudo find . -name '.DS_Store' -delete then, within a few seconds, the .DS_Store files get re-created by Finder before sudo find . -type d -empty -delete can take effect. I can do ...
2
votes
2answers
417 views

OS X Terminal – Open Tab in current directory, troubles with umlauts

I run OS X 10.7.5. I am currently experiencing an issue with Terminal. I have enabled the option to open new tabs in the current working directory. However, this does not work as expected, when the ...
3
votes
4answers
3k views

Keyboard shortcut to change tabs in terminal not working anymore in yosemite

I've set up a custom shortcut for Terminal to change tabs: cmd+option+left/right (the same as in most browsers, for convenience). I did this by going to System Preferences > Keyboard > ...
1
vote
2answers
35 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 ...
3
votes
2answers
161 views

How do I programatically kill the CCLibrary process by PID?

I need to know how to write a command or script to kill the CCLibrary and CCXProcess processes. They are part of Adobe's Creative Cloud, and since their previous update they keep respawning and ...
5
votes
1answer
131 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. ...
1
vote
0answers
11 views

Automate searching for a product by item number on a website and saving its image [closed]

I hope this is the right place to ask and that this question is appropriate. I don't intend to waste anybody's time. I am working on an ecommerce website and am just in the tedious stage of adding ...
0
votes
0answers
15 views

Meta key in Emacs in Terminal on a Norwegian Mac

In the Terminal, there is an option to choose whether to use Alt as Meta. On a Norwegian Mac, you have to disable this, because | comes from pressing Alt+7 (same goes for \ and a few others). ...
1
vote
3answers
78 views

None of my admin accounts are sudo users

I have three admin accounts on one machine running El Capitan. The machine is a few days old. Whenever I try to run a sudo command, I'm asked for my password and told accountUsername is not in the ...
0
votes
1answer
18 views

'soft return' in iTerm2

I'm just wondering is there a way to enter a new line in iTerm 2 without executing the line being typed? I am looking to make use of some relatively long commands to automate some things, but not ...
1
vote
1answer
136 views

“Copy URL to Clipboard.app is not available as a HTTP browser” in El Capitan

I came across “Copy URL to Clipboard.app” (or “CUTC” for short) in How to access a clicked URL in a URL handler application created in Automator and have been using it for some time now. However, it ...
7
votes
1answer
7k views

How to launch pdf viewer from the terminal

I'm working using LaTeX, since I compile the document in the terminal, it would be much easier for me to open it in pdf viewer directly from the terminal. I'm using OS X 10.8.2 in Polish, so I'm not ...
1
vote
0answers
38 views

Start application with environment from a terminal session

I use nvm to manage my node versions. Now i have to type nvm use stable to let nvm set my path variable like this ...
0
votes
1answer
162 views

install libsoup on macbook pro

I have a shell script from a open source project, when I run it in terminal, I get the following error: ./configure: line 17678: syntax error near unexpected token `soup,' ./configure: line 17678: ` ...
0
votes
1answer
121 views

How to Set my Mac's $PATH back the way it was before

I'm just getting started with Terminal, the other day I might have messed something up with my urs/local/bin. When executing echo $PATH it returns me with ...
2
votes
1answer
312 views

Terminal wraps at 80 chars even if window is wider

Problem description If I increase the width of a Terminal version 2.3 (309) window, and then use less (or some command invoking less, like man) in that window, I often get garbled output, since the ...
0
votes
1answer
23 views

How to delete a list of files and folder generated via find in terminal?

I'm generating a list of files and folder that meet certain criteria with use of a command: find ~/ -iname "whatIwantToRemove" The command will generate some results: ...
2
votes
0answers
41 views

How to customize drag-n-drop-to-Terminal path escaping results?

How can I change the way in which filenames are escaped (formatted) when dragged from applications and dropped into Terminal? For example, paths may be escaped with \, just spaces (), or other ...
0
votes
2answers
30 views

Changing the owner of a directory when username has a . (dot) in it [closed]

If I enter whoami in Terminal.app my id is shown as Abhi.Sri Now if I do chown -R Abhi.Sri /usr/local it says the user Abhi.Sri is invalid.