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

1
vote
1answer
1k views

Make `hostname -f` return fully qualified hostname

How can i make hostname (i.e. the unix commandline tool hostname, invoked in terminal) return a hostname including the domain information? At the moment, hostname, hostname -f and hostname -s return ...
0
votes
1answer
18 views

How use function keys in iPad with Apple keyboard?

I'm trying to use the Apple Wireless keyboard for coding in a terminal (with nano, vim, etc) using a app to access by SSH them in a remote server, and discover that all the function keys (Esc, F1, f2.....
2
votes
1answer
1k views

Terminal Failing to login

Suddenly, when I attempted to create a new terminal window, it fails. It does nothing for about a minute then shows only this: Login incorrect login: Typing in my username doesn't work. I get the ...
1
vote
3answers
60 views

Is there a way to list all available commands in terminal

Is there a way to list all available commands in terminal? I know linux has compgen -c is there an equivalent command for OS X? Update: The actual issue was that I was using zsh instead of bash. So ...
2
votes
2answers
2k views

“xcode-select --install” versus retrieving the dmg from Apple's developer website

I would to ask a question closely related to already existing posts (How to install command line tools without error that is not currently available on Software Update server? and http://stackoverflow....
1
vote
2answers
268 views

How to list audio card IDs from terminal

I am developing a script which deals with sound recording. As user potentially can have multiple sound cards attached, I would like to give him/her a chance to select desired one. The software I use ...
0
votes
3answers
29k views

Terminal command to kick selected users off my network

There are lots of ports in my small office but sometimes I want to kick out people who are accessing internet instead of doing their job. With arp -a i can look for all of the connected users. But how ...
0
votes
0answers
17 views

Possible to force command line to be somewhere else than bottom of the screen?

In my vimrc, I have the following line: let so=999 to force the cursor to stay in the middle of the screen, which is something I find more comfortable. However, when going back to the terminal, ...
0
votes
1answer
21 views

command line update of python3

I have both python 2.7 and 3.5.1 installed in my Mac (El Capitan). I left version 2.7 as per this recommendation. Now I would like to update version 3.5.1 to the latest one but from the command line. ...
5
votes
6answers
14k views

How can I write a script to open multiple terminal tabs and execute code in them?

I want to be able to open the terminal application and have it either automatically run a script that opens several tabs and run an arbitrary set of commands in each. For example I would like one tab ...
-1
votes
1answer
61 views

Batch copy time creation and modification date from files using OSX

First of all, I have asked the same question at stack overflow, but I am not sure if it's right over there. That's why I decided to post it here, too. t'm having a hard time trying to copy the ...
3
votes
2answers
105 views

Bash script to click button on an HTML page

I'm trying to write a Bash script that opens a browser, clicks an HTML button on a webpage, and closes the browser after getting response. I need this script to be executable from within Terminal. If ...
15
votes
4answers
141k views

How do I make the hard drive visible in the Finder?

On OS X Lion I don't see the hard drive in the Finder and I seem to have no permission to create a folder under / from terminal. I know I can do this if I activate the root user, but I need to be ...
-1
votes
2answers
21 views

-bash: /usr/bin/svn: No such file or directory

I am trying to upgrade my svn version. So I deleted older binary sudo rm /usr/bin/svn Then I installed svn brew install svn And linked it too athakur:home athakur$ brew link --overwrite ...
0
votes
1answer
33 views

Run Python Script on any Mac computer

Is there a way to create an executable Python script that will be able to run on any Mac via terminal, similar to a Bash script. I need any user to be able to just double click the file, and it should ...
11
votes
5answers
13k views

Open an app in fullscreen via Terminal

I wonder if it's possible to open a program in Lion fullscreen mode via the Terminal. I want to write a short script which starts a bunch of programs in fullscreen mode, so that I only have to click ...
0
votes
1answer
12 views

GNU screen updating or reinstalling

Is there a way of updating GNU screen for Mac OS X 10.11.5? My current screen version is 4.00.03 and would like to use the features such as layout which does not seem to be available for me. If not,...
0
votes
2answers
50 views

I get a bash syntax error message every time I open Terminal on macbook

-bash: /Users/admin/.bash_sessions/720116FC-4C25-4FFA-AC15-00D5C843C15F.session: line 1: syntax error near unexpected token (' -bash: /Users/admin/.bash_sessions/720116FC-4C25-4FFA-AC15-00D5C843C15F....
73
votes
14answers
81k views

How can I open a Terminal window directly from my current Finder location?

I was wondering if there was any was I could right click inside any instance of a "Finder" window such that I have an option that says "Open Terminal Here". It would be really helpful.
5
votes
2answers
4k views

List of (activated) fonts with shell command in os x

Is here any shell command for getting the list of activated fonts? Mean something like: some_font_util -activated -format 'file: name' for getting a list of activated fonts in a form: /Library/...
0
votes
1answer
19 views

Exception in thread “main” java.lang.UnsupportedClassVersionError (Trying run Alda on OS X)

I've hit a wall with trying to get Alda to run on OS X. It's an executable I downloaded from here; then, as per the installation guide on GitHub, I ran chmod +x alda on it, and then moved it to my /...
3
votes
1answer
27 views

OSX El Capitan reset the number of Spaces

Is there a way of "resetting" the number of desktop Spaces in Mission Control in El Capitan? I'm working on a previous co-workers Mac Pro, and somehow mission control has....325 desktop Spaces... I ...
0
votes
0answers
10 views

How to prevent KeyRepeat settings from typing repeated keys when no key is depressed

Initially, my issue was that I could not type a series of the 'A' character by holding down shift-a. Instead, I was presented with a bubble above the held letter for all sorts of 'A's with umlauts, ...
0
votes
0answers
21 views

External Hard Drive Not Showing Up after dragging it to Terminal?

So from the left side of the Finder I accidentally dragged my external hard drive and now it doesn't appear there. I would like to see it there, I know it's reading it because I did an ls /Volumes and ...
89
votes
4answers
38k views

Open Finder window from current Terminal location?

If I am in a specific path in a Terminal window, how can I open that same window in a new Finder window? Note: This is the opposite of opening a Terminal from Finder.
0
votes
0answers
58 views

Unable to start XVfb with XQuartz 2.7.9

Is there some issue with XQuartz-2.7.9 ? After installing XQuartz in my Mac 10.10 the command - /usr/X11/bin/Xvfb :4 -dpi 200 -screen 0 1000x1200x8 fails with the following error: ...
0
votes
1answer
69 views

ICMP packet with a negative round trip time?

I often keep a ping running in my Terminal so that I can pop it up to keep an eye on any network issues in our office. Recently, I ended a long-running ping session and noticed in the summary ...
-1
votes
1answer
49 views

Refreshing env variables by sourcing not working

I installed torch in my MacBook Pro (running El Capitan). Now for using torch, I've to refresh env variables. Official torch document asks me to run source ~/.profile. But the terminal is showing No ...
0
votes
0answers
30 views

Is there a way to turn off/on user account without deleting it running on OS X El Captain?

I want to turn off a user account without deleting the account and its content, so it won't appear in the login window and be able to turn it on again. I tried sudo dscl . create /Users/hiddenuser ...
1
vote
1answer
44 views

How to enable a disabled User Account on a MacBook Pro running OS X El Captain?

I disabled a User Account in the System Preferences > Users & Groups > Right-click on a User > Advanced Options... > Login shell: using: /bin/false Now the disabled account is visible in the ...
1
vote
0answers
23 views

Error when trying to “brew install rbenv”

I am trying to install rbenv by following instruction from the site Ruby on Rails development setup for Mac OSX when I try brew install rbenv I get the error below: Error: rbenv-rbenv already ...
41
votes
5answers
11k views

Using Alt/Cmd + Right/Left Arrow in iTerm

Is it possible to move between words in iTerm using Alt + Right/Left Arrows ? Now if I press Alt+Left I will get '[D' and '[C' if I press Alt+Right.
2
votes
1answer
67 views

User specific host file

I would like to add a user specific host file on my Mac (El Capitan 10.11.5) to a users home directory and have this be checked in addition to /etc/hosts when resolving domain names. I found a ...
55
votes
9answers
17k views

How do I speed up new Terminal tab loading time?

How can i speed up the terminal startup in Lion? I'm not referring to the startup of the Terminal application, but to the startup terminal windows, like when i open a new tab. I don't have anything ...
0
votes
0answers
35 views

FFMPEG Unable to find a suitable output format for [partial path from input]

Up until a little bit ago I had an Automator app with applescript and embedded bash for video conversion with ffmpeg and it worked great. Now for some reason I keep getting the following error: [NULL ...
0
votes
1answer
36 views

Resources for programming a text based interface in Swift? [closed]

Are there any tutorials someone could point me at for creating a terminal based, text interface application for OSX? Something sort of looking like Lotus 1-2-3 for DOS.
138
votes
6answers
69k views

git auto-complete for *branches* at the command line?

On my linux machine I have autocomplete for branches with git. [Note we are talking about git branch completion, not bash completion (e.g. commands, files, etc). Thus NOT lane's answer at all] For ...
0
votes
0answers
12 views

Script or App that identifies corrupt music files?

I'm wondering if there is a Terminal command or AppleScript or any sort of app that can scan a collection of MP3s, WAVs, and FLACs, and determine if they are corrupt. iTunes skips songs once it hits a ...
0
votes
1answer
46 views

Screwed up my 1TB HD iMac27 - I am running OSX 10.11.5 need to rebuild it in Terminal

** Not sure what I did but I need to regain the space on my 1TB HD. I have made a full back up and need to know the step by step commands in TERMINAL to do this. As you can see I have access to only ...
0
votes
1answer
32 views

Terminal.app and tmux session, can't use “open” command (without tmux it works)

I use Terminal.app and a tmux session. > open -a VLC file.mp4 The window server could not be contacted. open must be run with a user logged in at the console, either as that user or as root. ...
1
vote
1answer
18k views

My Finder is not responding and there are no documents on Desktop after downloading OS X Yosemite

I've just upgraded my Macbook Pro (15 inch, mid 2009) to OS X Yosemite and it is running slowly and my Finder is not responding at all and none of my documents are on my Desktop. I have tried taking ...
1
vote
2answers
103 views

AppleScript set focus on terminal window

I have a AppleScript, which changes the position and the size of the application Terminal: Like here: tell application "Terminal" set position of front window to {1, 1} set size of front ...
2
votes
2answers
8k views

How can I make an Automator service run a shell script and display the output?

I'm using Automator to run a shell script (ffmpeg transcode to h264) as a 'Service', so that I can just right click the high res .mov file and select the service. It works fine, but as it's ffmpeg it ...
1
vote
2answers
25 views

screenshots storage place back to desktop impossible

I previously changed the settings of which folder to save screenshots. Now I want to go back to the default settings, storing it on the desktop. I have read what to do, in Terminal enter:defaults ...
24
votes
5answers
23k views

Can I view system stats in the Terminal?

The widget iStat Pro allows to monitor different system stats like CPU usage network bandwidth in/out memory usage ... How can I view such system stats in the Terminal?
2
votes
4answers
48k views

How to send text with telnet in Terminal?

I would like to send some text to a port on my machine using telnet in the Mac OS X Terminal. I start telnet using: telnet localhost 8080 Then I type some text. Is that text send automatically or ...
0
votes
0answers
26 views

Calling terminal command (pdfcrop) either directly from python or from within applescript (do shell script)

on OSX, I am using applescript to get a latex string from an application (OmniOutliner), process it via a python script that calls pdflatex and pdfcrop, and paste the final cropped pdf back into ...
0
votes
1answer
29 views

Command-line keychain access not showing any results [duplicate]

I have been trying to learn to control my computer through command-line, and keychain access is what I am trying now. I have been using the security command, and attempting to get my wifi password (I ...
0
votes
1answer
38 views

Problem “do shell script” on curl – Works in Terminal, but not via “do shell script”

I want to use "curl" with "do shell script" in an apple script. It already worked some months ago, but then the provider changed to https-only service. So I update curl on Mac OS Terminal: $ curl -V ...
2
votes
3answers
1k views

How to remove space character (whitespace) from end of filenames and foldernames?

Problem with mac is that it allows space character at end of file or folder. If this file or folder with space character in end is beeing copied to FTP using Filezilla or Dropbox then mac makes ...