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

2
votes
2answers
52 views

.bash_profile not updating until open new Terminal window

I am trying to create a Terminal command. I have created this so far: cd ~/ && touch .bash_profile && echo "" >> .bash_profile && echo "alias sendtext=\"osascript -e 'on ...
0
votes
0answers
14 views

“Display Notification” stuck in loop in Bash script

Is there any way I can fire a banner notification once through a bash script? I'm trying to modify this BitBar plugin to be a little fancier: #!/bin/sh # <bitbar.title>Gmail ...
1
vote
1answer
51 views

OS X copy paste into Terminal adds fdbf bfb9 b083 to beginning and end of selection

For the life of me, I can't figure this out. When using a browser (doesnt matter which), if I select text, then paste in Vim or Neovim, I see characters added to the beginning and end of my ...
1
vote
2answers
23 views

Is it possible to invoke play button using terminal?

I want to control my media player (iTunes, Spotify, etc) using terminal. My goal was simply to trigger press on play/pause button using script. Is that possible?
0
votes
0answers
33 views

Troubleshooting converting Ubuntu.iso to ubuntu.img with hdiutil in Terminal

When I try this command: hdiutil convert /Users/Example/Example/ubuntu.iso -format UDRW -o /Users/Example/Example/ubuntu.img The terminal says that the image is not recognize, what am I missing?
2
votes
1answer
34 views

How to make Terminal windows persistent

How can I make it so Terminal will remember the currently open windows on Quit, and reopen those windows, with all the existing text intact? I have two machines: Both on El Cap Both with identical ...
1
vote
1answer
39 views

Remove characters preceding the second underscore in file names

I have a bunch of files and I would like to remove all characters preceding the second underscore in the file names. An example is shown below. How do I do this using bash commands? [From] ...
1
vote
0answers
16 views

Applescript claims to run shell script, but script has no effect [duplicate]

So I have a bash script like this: #!/bin/sh FILE='some_file.js' gsed -i -E 's/something/somethingelse/' "$FILE" echo "Modified File" When I run this from command line, it echoes the last line, so ...
1
vote
1answer
61 views

iTerm2 does not show username, machine name, time

On my new mac machine, I could not do autocomplete for Git when I hit Tab. So I thought to modify the terminal and found certain things on this link. I may have messed when I installed iTerm2, ...
0
votes
2answers
46 views

Python socket program taking forever to run

I tried to run following program on my Mac terminal. import socket mysock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) mysock.connect(('www.py4inf.com', 80)) mysock.send('GET ...
2
votes
1answer
48 views

Is there a terminal emulator for Mac OS X that supports binding Ctrl+(Shift)+Tab?

I want to bind Ctrl+Tab to "\033[27;5;9~" and Ctrl+Shift+Tab to "\033[27;6;9~". Unless I am missing something, the default Mac OS X terminal emulator will not let you bind these key sequences to ...
0
votes
1answer
19 views

How do I change/delete alias in OS X permanently?

I tried to modify/delete alias, but it seems that it is only for the current session by doing this unalias name or rename it unalias name='...' Can anyone tell me the way to change/delete it ...
0
votes
1answer
78 views

Looking for an ARD/ Unix command to clear firefox history/cache on a mac

I'm trying the following but not having any success in seeing anything cleared: rm -R /Users//Library/Caches/Firefox/Profiles/.default/Cache Thanks!
4
votes
1answer
66 views

Change font of Terminal programmatically w/o restarting

At home I've got a nice big display that unfortunately does not have the same resolution as my retina macbook does. I'd like to use a pixel-font on the low-res screen and a nice smooth one on the ...
3
votes
1answer
42 views

Recognise command and colour it on the terminal?

I was wondering if it's possible to colour a recognised command in real time while typing and/or when switching to previous commands using the arrows. For example, if I start typing gre, it should ...
0
votes
0answers
53 views

My Mac is slow after upgrading the OS

Recently, after upgrading to EL Captain, my terminal has slowed down way too much. Should I go back to my previous OS? My Mac has 4GB RAM and a 500GB HDD. Macbook Pro 13-inch. It has been one ...
0
votes
1answer
84 views

Find all hidden files that were hidden using the command “chflags hidden filename”?

I remember to hide an important file, but I can't find it anymore and I don't remember the name. I don't remember how I hid it, i.e., if just by inserting a prefix of . or using chflags hidden ...
0
votes
1answer
32 views

Terminal doesn't force quit

When I click Terminal in Launchpad, it says "The application Terminal is not open anymore." But it shows up in the Force Quit window and it has the open-app indicator on the dock. I can't quit the ...
0
votes
1answer
39 views

My terminal background keep changing after each restart

I have this in my ~/.bash_profile export ANDROID_HOME=/Users/username/Library/Android/sdk export PATH=$ANDROID_HOME/platform-tools:$PATH export PATH=$ANDROID_HOME/tools:$PATH export ...
1
vote
1answer
61 views

Setting Terminal tab names in OS X and using vim

I regularly ssh into a Linux cluster from an OS X (El Capitan) Terminal, sometimes with multiple Terminal tabs. I use bash and vim. I'd like to do the following: while ssh'd, set the Terminal tab ...
1
vote
0answers
50 views

How to prevent terminal geometry changes when changing external display on MacBook Pro 13?

I have a MacBook Pro (Retina, 13-inch, Early 2015) that I use with Dell 2711 (at home) and 2713 (at work) external displays. Usually, but not always, when I bring my Mac from work to home, and vice ...
1
vote
0answers
46 views

`scutil --nc start` not connecting PPPT VPN - OS X 10.11

From the answer to this question I have tried scutil --nc start 'us.justfreevpn.com' to connect a PPPT VPN, but all I get is the following popup: Frustratingly, if I manually start the connection ...
0
votes
0answers
39 views

Can I conclude that I have to upgrade my mac's RAM based on these stats?

My 2012 13 inch MacBook Pro has become real slow, even when just a few programs like Itunes, Safari or Spotify are opened. I've been cleaning up my HDD, but I don't feel like it's speeding up. So I'm ...
0
votes
2answers
39 views

Launch command using app

Could someone please tell me how to insert a terminal command into an "application" so when the app is clicked/opened the command is launched?
1
vote
1answer
90 views

SSH (or SFTP) upload files from OSX terminal

I'm trying to upload a file through terminal (didnt managed to do it trough transmit.app) I'm connected to SSH to my server. I want to sent a file from my Local desktop to my server. That the ...
0
votes
1answer
74 views

Open an ssh session in terminal with BetterTouchTool

I was hoping to configure a keystroke command using BetterTouchTool to open a terminal window and run an ssh session. I do this a lot to connect to a RaspberryPi on my network. The execute terminal ...
0
votes
1answer
57 views

How to grep with filename highlighted in one color, and the match highlighted in another color?

On the Mac, I can't seem to use grep and have the filename highlighted (or in) a certain color, and have the matching string in a different color. Is there an easy way?
0
votes
2answers
80 views

How to stop Terminal from opening instead of Finder functions, such as New Folder, Open File, copy, paste, trying to move a folder to Desktop?

When trying to open new folder on Desktop from Finder-menu Terminal opens instead. Also I cannot move documents and folders onto Desktop- get a "forbidden" sign (= white circle with slash through it). ...
0
votes
0answers
34 views

OSX handling of USB Drives and Permissions - need clarification/explanation

I'm new to the site, and well, new to MACs. I have an image (dual boot yosemite and win7) on some old iMACs, late 2009s. When I deploy this image, sometimes my bootmenu disappears and I have to ...
0
votes
0answers
120 views

Text selection in terminal without mouse - moving cursor using arrow keys

I recently moved from a well-configured Ubuntu to Mac. I used Emacs for many years but I am too lazy to re-install it (and re-configure it). One of the useful features in Emacs shell is that you can ...
3
votes
2answers
192 views

Numeric keypad keys in vi insert letters instead of numbers

I'm new to vi. Actually I'm using it just to modify small text files. I've a serious and unusual, I think, problem with the numeric keypad, as follow: I write vi IN and press enter. This make me ...
0
votes
0answers
35 views

“Console mode” crashed under Yosemite

I tried to enter the "console mode" in OS X 10.10.5. However, after some characters existed on the screen for about 1 second, the screen turned dark and nothing else happened. It must has been ...
0
votes
0answers
36 views

Open SSH server files automatically with AppleScript

I am trying to build an Apple Script which will: 1. Open terminal login in SSH with details 2. After login, open a python script which is on ssh server automatically I want to do all of these tasks ...
-3
votes
1answer
47 views

Make mac become more server [duplicate]

Take another system I use (for example CentOS). I use the following code to make it become server. # No GUI systemctl set-default multi-user.target # Enable SSH sudo systemctl start sshd It has ...
0
votes
1answer
35 views

How to make terminal maximize at open?

By right clicking its icon, I can make terminal.app "Open at Login". But I want to maximize the terminal window when it's opened. So it will be very cool when I login: Imagine an OS X without GUI! (at ...
0
votes
0answers
53 views

False error Undefined property when debug php script in El Capitan

I have installed PHP and x-debug from homebrew in El Capitan: php -d xdebug.remote_enable=on -v PHP 5.6.18 (cli) (built: Feb 6 2016 06:53:53) Copyright (c) 1997-2016 The PHP Group Zend Engine ...
0
votes
2answers
43 views

Rights on file read write execute

I am logged in as "myuser" which is also the administrator of the computer. I have a file on which I have the following rights: -r--r--r-- 1 myuser staff 167 17 Feb 14:26 my_python.py However, ...
0
votes
1answer
46 views

Managing keychain from terminal

I want to move my keys from login keychain to system keychain from terminal. Is that possible? I checked the security manual but I can not see the option there to do so.
1
vote
1answer
34 views

ssh port forwarding error

I have two Linux servers and one Mac client, and I would like to do SSH port forwarding via local port address on the Mac. In Terminal 1 on the Mac, localhost:~ user1$ ssh -L 8022:server2:22 server1 ...
1
vote
1answer
77 views

Ssh app on iPad runs bash script

ServerAuditor is a free iPad app that allows ssh to a server. I am trying to copy my public key to a server to allow password less login. On a pc this is easy- Generate the rsa key open terminal and ...
1
vote
0answers
34 views

Is there a unified shortcut key of Home/End for Terminal, Vim and Sublime Text in OS X?

It seems that in Terminal: fn+shift+← is Home fn+shift+→ is End in Vim: fn+← is Home fn+→ is End in Sublime Text: cmd+← is Home cmd+→ is End And Ctrl+A and Ctrl+E seems to work ...
0
votes
0answers
44 views

Using “open” command in OS X Terminal / Finder split view

When I use Terminal + Finder in Split View mode I would really like to use open . command to open folder in the same Finder window. But instead - new window is opened. I also tried open . -g - no ...
1
vote
1answer
80 views

How to enter internet credentials using terminal?

After attaching the ethernet cable to my Mac I need to enter username and password to access the Internet: The problem is that I would like to perform a system recovery using cmd+R at startup. ...
0
votes
0answers
21 views

Terminal always starts from mathematica command line

This is an old issue in my MBP. If I open terminal, it doesn't show the command line, but runs mathematica. Thus I must type 'Quit[]' to exit the mathematica environment. The mathematica was installed ...
1
vote
1answer
60 views

Setting anacron on Mac - Shell Scripting

I set cron to run script every day using env EDITOR=nano crontab -e where I wrote something like this @daily path/to/sript.script. Now I want to use anacron to be sure that script is going to be run ...
1
vote
1answer
118 views

Using “tar” command in Terminal for multiple folders/files

I have many files like these SomeDirectory/RandomName.spa SomeDirectory/AnotherRandomName.spa SomeDirectory/YetAnotherRandomName.spa ... I want to unpack every .spa file in SomeDirectory to their ...
1
vote
1answer
138 views

Install automator service via command line

I would like to automate my Mac installation flow for services. The following is my script: #!/bin/sh rm -rf ./tempWorkflows mkdir tempWorkflows for filename in ./*.workflow; do cp -R "$filename" ...
2
votes
1answer
40 views

is a directory error in bash script

I have very limited knowledge of bash scripting, and I haven't been able to figure out what I'm doing wrong. So I apologize if there's an extremely simple solution that I've overlooked. I'm trying to ...
1
vote
0answers
22 views

How do I get Terminal to stop forgetting history in 10.11

The current version of Terminal seems to have restructured history into a session based history management. For example, each tab has its own history on exits of Terminal and starting up Terminal ...
3
votes
1answer
62 views

How to differentiate between Terminal scripted launch and manual launch for .bash_profile settings

I have some .bash_profile settings that restore my last working directory every time I log in to my shell. However, I also use a program that opens a terminal window in the current directory open in ...