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

0
votes
0answers
27 views

How do I make terminal windows STAY the same size?

I have set up my terminals, so that they are the size I want them to be. However, I often have several tabs open in each window. Terminal keeps trying to make the window BIGGER when I get too many ...
0
votes
0answers
36 views

-p: command not found - Automator help needed

I'm using Automator to run a shell script for taking an interactive screencapture and opening it in Preview for easy annotation. When running the script it fails and states -: -p: command not found. ...
0
votes
2answers
62 views

How to get file sizes of large files in OS X Terminal?

I'm trying to get the file size of a big file (1GB +) using the OS X Terminal. I'm using du -sh. But also after 30 seconds I don't have any result, is there any faster command? Thanks.
0
votes
2answers
23 views

How to see progress of download started in the terminal

When downloading software via the terminal is there a way to see the download progress? I kicked off a download via the terminal and I can't tell if it's progressing or stuck.
1
vote
1answer
37 views

Is there a terminal command to open applications in a specific Desktop?

For example when I run open -a Kodi I'd like to be able to specify which Desktop I'd want the application to launch in. Trying to avoid dragging/dropping to the desired workspace.
1
vote
1answer
46 views

Make Cmd+C do both Copy and Stop in the terminal

Left control Key located in a very unpleasant place on my Mac keyboard. It's hard to reach in the terminal. Luckily, I don't need it very often: I have Cmd for most of the things. There are few cases, ...
0
votes
1answer
46 views

Can't empty trash on Mac

Recently every time I try to delete files, my OS asks me to type in a password. After I type in password, the files are deleted from the folder, but it doesn't free up space and the files don't show ...
0
votes
2answers
43 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....
0
votes
1answer
30 views

How to change the GNU Make's (default) default location of gcc

I run Mac OS X El Capitan 10.4. I have used brew to install Compilation Tools (https://www.topbug.net/blog/2013/04/14/install-and-use-gnu-command-line-tools-in-mac-os-x/). Now when I run make, it ...
1
vote
0answers
29 views

Dump iCloud keychain in Terminal

I failed to find the path to iCloud keychain to do just security dump-keychain - the iCloud keychain isn't shown when I try security list-keychains. What is the path to that keychain (or, if it cannot ...
0
votes
1answer
17 views

How do I get 'New Terminal at Folder' functionality when dragging a folder to the terminal dock icon?

Sometimes I like to open folders in Terminal by dragging the folder to the Terminal dock icon. However this creates a new Terminal window instead of creating a new tab in my current Terminal window. ...
0
votes
1answer
68 views

Extract text between two unicode symbols using AppleScript or bash?

My goal is to take text from a standard .txt document, and use (preferably) Terminal or Applescript to extract text between the symbols ▶ and •. While there is only one ▶ symbol there are multiple ...
1
vote
2answers
49 views

How to inspect TCP/IP packets

How can I inspect IP packets send through currently open TCP connections? I opened a nettop utility in Terminal, which I think lists IP packet, but doesn't tell anything about their content, namely ...
1
vote
1answer
36 views

Change iTerm2 profile depending on current directory

Using my .bash_profile, I used to change my iTerm2 profile per machine with the following command: echo -e "\033]50;SetProfile=ssh\a" Now, I want to change it depending on my current working ...
0
votes
0answers
12 views

Is there something like Alt-SysRq-k in Terminal?

What I mean is whether there is something that kills all processes in the current tty
12
votes
4answers
238 views

in terminal, I cannot type lower case e

2015 MBP, fully up to date OSX I open a terminal window and if I type the letter "e" (without quotes of course) it beeps and will not type the letter. Every other letter works just fine in terminal. ...
0
votes
0answers
8 views

How to Replace TextMate's Search by Custom Function?

TextMate uses currently mdfind as its search (CMD-F) which is bad/unstable/useless/... with .tex files. I would like to replace it by my own search function. How can you replace TextMate's default ...
0
votes
1answer
31 views

Is it possible to create a service using only the shell and bypassing automator altogether?

Using automator is somewhat of a tedious task. Using the shell in the Terminal is much easier all around. Even using the "Run Shell Script" action inside automator is not the same as using the actual ...
0
votes
0answers
45 views

Open new Terminal window with home directory set to current directory?

I want to programatically open a new Terminal window. I've setup a custom profile in the Terminal preferences and exported the profile. I can open a new window with that profile by calling it ...
0
votes
1answer
18 views

Can I edit/create a PDF's Table of Contents with freeware?

I have a PDF with a number of parts. I would like to create a Table of Contents to navigate the PDF with ease. I would like to do on a Mac this with freeware. (A command-line program would be great.) ...
1
vote
1answer
41 views

How can I get ^C to show up when I do Control-C on a Mac terminal?

If I type a command, and halfway through I decide not to run that command, I do a Control-C to cancel it without having to backspace the whole thing, e.g. mv foo.txt bar.txt. On Ubuntu it'll show up ...
3
votes
1answer
111 views

Can't write to /usr even with sudo

Here's my problem: sudo php -d detect_unicode=0 go-pear.phar ...should let me run as root and modify /usr & /usr/share directories, but I get this: Below is a suggested file layout for your ...
5
votes
3answers
868 views

How does the sudo key symbol work?

I'm trying to write a script that requests the user password for some sudo-related commands. My goal is to emulate the default method that OS X uses to obtain the user's password, Password: followed ...
3
votes
1answer
48 views

OpenSSL encryption method doesn't work on El Capitan

The following file encryption method works on OS X Yosemite: Encrypt: openssl enc -aes-256-cbc -salt -in file.zip -out file.zip.enc Decrypt: openssl enc -aes-256-cbc -d -in file.zip.enc -out file....
1
vote
0answers
22 views

How should daemons tell users about errors?

I wrote a bash script that backs up certain files on my computer. To automate the running of the script, I set up an associated daemon that runs the script every day. There are certain instances ...
0
votes
0answers
15 views

$PATH change won't persist [duplicate]

I looked at my $PATH and noticed that it starts with: /Applications/anaconda/bin: This doesn't seem right to me and I am not sure how it got there, so I tried to reset $PATH in terminal using: ...
3
votes
2answers
50 views

How to Change USB Thumb icon using Terminal or Bash/other scripting language

I'm looking for a method to change USB or External Drive Icon using bash or any other command line method. I know how to manually chnage them like this I am using El Capitan
4
votes
1answer
80 views

Is there a way to control dual monitor relative position from terminal?

I have a weird setup for my home office that allows me to switch from a standing desk to a sitting desk. The only problem is that when I alternate positions, my laptop's external monitor switches ...
0
votes
0answers
48 views

In Terminal, how do I run a curl command to POST data?

I'm using OS X Yosemite and having trouble running curl to POST data to my local server. Below is the command I'm running and the response: localhost:myproject davea$ curl --header "...
1
vote
2answers
61 views

How can I switch to an open tab in Safari using osascript?

Trying to switch tabs in Safari with osascript. I have tried multiple versions of the following: osascript -e 'tell Application "Safari"' -e 'keystroke "2" using command down' -e 'end tell Tried ...
0
votes
1answer
18 views

Reverse SSH tunnel daemon

I own a Macintosh laptop (10.11.2) that I would like to create a permanent reverse SSH tunnel. This way, when I switch network, or the computer is stolen, I can remotely SSH into the device ...
0
votes
1answer
43 views

change screen resolution with AppleScript

How can I change change screen resolution using AppleScript? If AppleScript can't do it, what about Terminal? I tried with examples at How to set screen resolution with a keyboard shortcut on Retina ...
3
votes
1answer
164 views

OS X : Terminal command to turn ON/OFF SSH server

I know how to turn on SSH server from System preferences :- (System preferences -> Sharing -> Remote Login ) Now I am looking for a terminal command for the same. By knowing it I can use the ...
8
votes
1answer
475 views

How to get the geolocation of an IP address in Terminal?

Is it possible to get the geolocation of an IP address in Terminal? Not sure what the numbers in an IP address mean, but there must be some logic behind it, so lookup can't be that hard.
3
votes
3answers
33 views

Why does the Terminal app icon show an unread message?

For the first time in roughly three years, the Terminal app icon in the dock shows that red new message overlay. To the right, the same happens with Thunderbird which I am used to as I do have ...
0
votes
1answer
63 views

How to change timezone in recovery mode? [duplicate]

I have a MacBook pro and I'm trying to instal OS X El Capitan on a clean formatted SSD hard drive. While installing I encounter an error saying "this copy of the instal os x el capitan application can'...
1
vote
0answers
32 views

SSH keybased authentication using smartcard

I originally posted this on Information Security but am hoping to attract an answer here since this is OSX specific. So I'm fairly new to more secure forms of key management, I've been used to ...
3
votes
1answer
63 views

Add command to sudo in OS X - or how to fix a major security inconsistency in OS X

OS X provides Keychain Access, which is a great way to save passwords of varying apps and websites. When you want to view a password via the Keychain Access GUI, you are asked the admin password. ...
0
votes
0answers
49 views

Get result of Terminal tab do script via commandline

I've seen similar questions like this but none seem to deal with getting the result from a specific Terminal tab? I'm writing a Chrome extension to do some awesome stuff. Right now I'm just trying to ...
1
vote
1answer
42 views

The terminal on my Mac does not work anymore after installing Python & Sublime Text

I was trying to install Python3, and Sublime Text 3 in order to learn and run Python. Unfortunately, I watched some videos on youtube and tried to follow their instructions, I did something with my ...
0
votes
1answer
39 views

Can the cp command be used to restore a hard drive?

My cousin contacted me for tech support because her computer was refusing to boot to the startup drive, and the issue turned out to be a corrupted drive that Disk Utility refused to fix, telling us to ...
0
votes
2answers
52 views

prevent networksetup from asking for password

I am trying to get rid of password when changing proxy with networksetup. I changed permissions to read and write of /private/etc folder and propagated change to subfolders. I tried this: sudo chmod ...
0
votes
1answer
37 views

How to use GUI pinentry program for GPG

I would always like to use the GUI version of entering my GPG passphrase. Currently my pinentry program is set the same on my laptop as my desktop. But the desktop always asks for my passphrase on the ...
0
votes
0answers
28 views

Use Terminal to echo a Messages chat

What script/command could I use to echo a readable format of my messages with someone? Is there any way to echo the chat.db as a table for that one person who I am chatting with?
1
vote
1answer
89 views

Automator: “Run Shell Script” throws error because of missing “on” command

OSX 10.11.4 here. I'm trying to create a workflow for use with a hotkey, to run a simple shell script. Created via: Automator -> New Service -> Utilities -> Run Shell Script, then set to 'no input' ...
1
vote
1answer
70 views

How to avoid password prompt in terminal?

So sometimes my Mac loses its connection to the Internet. When I'm in front of it physically I can use the terminal and do the following to repair it: networksetup -setnetworkserviceenabled ...
1
vote
4answers
80 views

In Terminal, how can you determine which shell is actually running?

Using Terminal on OS X 10.11.4, initializing Terminal opens a new window running bash (by default). As I understand it, inputting echo $SHELL should output the shell that said command is submitted to. ...
0
votes
1answer
28 views

How to add shortcut to directories to OS X menubar

I have several directories that I want to quickly access in Terminal. And sometimes even in the finder. I would like to be able to hit an icon in the menu bar and have it drop-down a list of folders ...
0
votes
1answer
34 views

update git repository with apple script

I want to update my git Bitbucket online storage with apple script. This is the code that works in Terminal, but not when i run apple script. cd /Users/mainuser/Desktop/Projects git add -A git commit ...
1
vote
0answers
17 views

How to disable LoginWindow (boot to Darwin console)?

This may seem like an odd question, but it's one I've been wondering for quite a while. There is an old trick to get access to a console by typing >console as the username in the login window. ...