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
1answer
75 views

Calling Python 3 script from AppleScript

I have a Python 3 script that I'd like to add as a Service using Automator. The idea is that I can right click on a text file, and an option will display to run my script on said file. The shebang ...
60
votes
17answers
254k views

Is there a way to start a specific application with a keyboard short cut?

Sort of like the Windows+R command in the windows world? That actually just lets you run a command but you get the idea.
11
votes
3answers
216k views

How do I run terminal in sudo mode?

I was trying to install npm, and I got npm ERR! Error: EACCES, Permission denied '/usr/local/lib/node_modules' npm ERR! npm ERR! Please use 'sudo' or log in as root to run this command. npm ERR! ...
1
vote
0answers
22 views

Airmon-ng on Mac

so I know that Airmon-ng isn't made for Mac, but every time I try to run it all it says is that the wireless tools are missing. And I've heard people say to just download the wireless tools but where ...
0
votes
0answers
36 views

How to sort a list of files ordered alphabetically to a list ordered numerically?

I'm trying to split large .csv files into several smaller ones ordered numerically, i.e., "File.csv" into "file_1.csv, file_2.csv, file_3.csv...". When I use the command: split -l 100000 File.csv ...
2
votes
3answers
5k 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 ...
0
votes
1answer
59 views

Mac OS X Terminal mouse reporting

I don't know why this is bothering me but I've been pressing Cmd-R to refresh my browser and today I mistakenly pressed this combination while using the terminal. I came across an option known as ...
1
vote
1answer
155 views

Shell command or series of commands similar to the Automator action “Get Link URLs from Webpages”

I have a long list of URLs. Contained within each of these webpages, there are links I need to extract. The Automator action Get Link URLs from Webpages is a very useful action for this task. ...
0
votes
0answers
96 views

El Capitan Mac: /usr/bin/login tries to run /bin/false

Just upgraded from Yosemite to El Capitan, and I started out with an Emacs problem: it wouldn't launch from the Emacs.app icon, complaining that it couldn't find /bin/false. I tracked this down to ...
0
votes
0answers
29 views

Fresh OS X install, cleanly manage terminal applications going forward

I just got a new Hard Drive and installed a fresh copy of El Capitan on it. I'm a computer programmer and use a ton of terminal commands. Is there anything I can / should do now that my computer has a ...
12
votes
8answers
12k views

sourcing bash profile for root users

Apologies in advance if this question is going to annoy the hell out of everyone as I appreciate, it's been asked in various ways many times before. Please be assured, I have read the archives and ...
2
votes
0answers
12 views

Get current time with/in milliseconds from OS X command line [duplicate]

I'm trying to get the current time from OS X command line to work with in AppleScript to output the elapsed time. Currently I'm using this script: set timea to do shell script "date +%s" ##something ...
0
votes
1answer
48 views

Unable to clear Xcode from Trash. Force clear in Terminal returns permission error?

Since the App Store seemed stuck with updating Xcode to 7.3, I have decided to delete it and reinstall. However, after moving Xcode to the Trash, it refused to be cleared and instead be stuck on the ...
1
vote
0answers
32 views

Terminal command to change Keyboard preferences on Mac?

I'm trying to configure new Mac accounts to have certain languages added to their keyboard preferences. Is there a terminal command to add languages to a particular user's keyboard preferences or ...
0
votes
1answer
29 views

Clean shutdown/restart from terminal in 10.7+

I have a headless system that is controlled remotely that I need to shutdown/restart in an automated way (without the use of VNC or local keyboard/mouse). Using various commands via SSH or via my ...
7
votes
2answers
5k views

Why is is not possible mark text in my Terminal window anymore?

I am an eager Terminal user on Mac OSX Yosemite. From time to time I mark text in the Terminal window to copy(right click or cmd+c) onto the clipboard. For some reason it suddenly stopped working! I ...
2
votes
1answer
246 views

How to disable middle click paste Mavericks Terminal?

I have looked all over the Net and can't find a way to disable middle-click paste in the Terminal application in Mavericks? I want it scroll but not paste. Anybody know how to fix this? I'd sure ...
5
votes
3answers
4k views

How to spoof a USB-Ethernet adaptor's MAC address in OS X

I've recently bought a usb-ethernet adapter (not apple) and I get internet connection. In my university we have to put a specific mac address but I can not change it. I have tried with sudo ...
22
votes
5answers
84k views

Why does OS X Mavericks block the purge command in Terminal?

When I try the purge command on my terminal, OS X Mavericks gives me the following message: Unable to purge disk buffers: Operation not permitted This hasn't been the default behavior until now. I ...
0
votes
3answers
58 views

How to make Terminal open every new tab in the “Homebew” profile?

I really like Terminal's "Homebrew" profile (black background with green front, instead of the default white background with black font), so I set it as my default profile. This makes it so that when ...
16
votes
3answers
13k views

Can I install or update Mac App Store apps through a command line using terminal? [duplicate]

Is there an official way provided by Apple or a workaround so that I can install or update Mac App Store apps through Terminal?
0
votes
2answers
66 views

How to type in Mac window?

I want to enter a simple adb shell command, so I navigated to ...\sdk\platform-tools\adb.exe, and opened it. However, I am unable to type in it! I am a new Mac user after recently moving from ...
0
votes
1answer
900 views

How to batch download all files in a Volafile.io room?

Volafile.io Live Filesharing & Chat Example URL: https://volafile.io/r/$ID. There is Feature request: Download all the content of a room in a .zip file. #117. I don't wish to depend on that ...
0
votes
0answers
16 views

Odd behaviour for long commands after styling the terminal

After putting the following statements on the ~/.bash_profile file: # STYLING THE TERMINAL # References: # - ...
0
votes
0answers
29 views

curl isn't outputting what it used to

I had programs that relied on using curl in the terminal (bash) and one day thy just stopped working. I realized this was because the output of curl had changed for some reason. I thought maybe the ...
0
votes
0answers
46 views

OSX Activity monitor (energy) shows terminated terminal app with high average energy impact

I use my macbook like desktop (always connected to electricity) 95% of the time, so I never noticed this before. However, I had to use it on battery last few days and it surprised me how short the ...
1
vote
1answer
71 views

Get URL of opened tab / tabs from terminal

I have a tab open in Google Chrome. Is it possible to get or check it's url from terminal? If not, how about automator script? Will also be satisfied with a title.
0
votes
2answers
47 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 ...
1
vote
3answers
502 views

Open a terminal window in another screen on login

I was wondering if there is a way to get a terminal window to open up in another screen on startup. I know you can set terminal to open on start up, but I specifically want it to open in another ...
5
votes
3answers
586 views

To use STDBUF from Homebrew's coreutils

I run brew search stdbuf and get No formula found for "stdbuf". Searching pull requests... Closed pull requests: coreutils: upstream fix for stdbuf (https://github.com/Homebrew/homebrew/pull/32955) ...
2
votes
1answer
447 views

To install unbuffer in OSX

There is the terminal command unbuffer in Linux Redhat, for instance. I did not find it in homebrew. How can you install unbuffer in OSX Yosemite 10.10.3?
0
votes
1answer
111 views

terminal -bash: command not found

I'm trying to compile a c++ program on the Mac terminal with gcc then the source files path. I've found some short term fixes on the Internet but I want it so it works every time. Also I hardly know ...
1
vote
0answers
23 views

Virtualenvwrapper, can I get rid of it from Terminal and my Sublime Text?

I have an MBP latest OS running, I tried to follow a guide to install VirtualEnvWrapper a few weeks ago, not too sure why. But I keep getting this error when opening terminal and its quite annoying, ...
32
votes
8answers
22k views

Can home and end keys be mapped when using Terminal?

The home and end keys on a MacBook Pro can be emulated with fn + left arrow or fn + right arrow. Or when certain settings are changed, with the Command (Apple) key instead of fn. None of these ...
0
votes
0answers
20 views

What happens to programs like node, npm or grunt that has been installed globally after os x reinstall?

I have huge problems with the kernel_task. I have a Mid-2015 15" rMBP with discrete GPU. It really annoys me when kernel_task goes 400% 500% CPU and I could not solve this problem. I want to reinstall ...
0
votes
2answers
58 views

How to write a script that runs whenever a new file is added to a specific directory?

I've never written a script for OS X, and I don't really know which scripting tool i'll use for this task. Here's a pseudo code for the script I want to build : whenever a new file X is added to ...
10
votes
2answers
25k views

SSH request timeout every time

I am trying to access a storage space we have at work via ssh but I get a timeout every single time (Mac OS 10.7.5 - Terminal). I checked firewalls, settings, even turned off Little Snitch, and port ...
2
votes
2answers
86 views

What is the most OSX or Darwin-like command-line experience available (without buying an expensive Mac or hauling my production machines home)?

I want to emulate the command-line experience from OSX with a small netbook and practice my skills with the comfort of this small machine. Surely Apple offers actual Darwin Links for developers or ...
3
votes
2answers
142 views

How to enable/disable OS X beta participation from Terminal?

Does anyone know how to enable/disable OS X beta participation from the Terminal? Typically one could opt-out of the Beta program by choosing the following option found in the App Store preferences ...
2
votes
1answer
61 views

Basic OS X folders - folder structure regarding users

I am logged in as user "vlado" on my MacBook running El Capitan. If I go and type whoami in Terminal, it says vlado too. So this is fine. But in my folder structure in hd/Users/vlado/Applications I ...
1
vote
1answer
35 views

Setting up execution path in Terminal

I have no experience with using Terminal but I am trying to install a program msbayes (installation instructions here. The instructions say to set up an execution path using either $ echo 'export ...
1
vote
0answers
127 views

Curl terminal command syntax from Applescript

I want to execute a curl command in Applescript that does the following (per this SE question/answer): http://superuser.com/a/1054803/471181 ...Do an HTTP POST of the contents (as a string) of a ...
3
votes
1answer
208 views

Non-debug qlmanage

I've got a bash alias set up in my terminal, alias quicklook='qlmanage -p ', in order to easily quicklook files from the terminal, but the output bugs me. Testing Quick Look preview with files: ...
0
votes
0answers
6 views

Adding Aspshell user account via terminal

Good Day, I'm new in Mac OS X (Maverick). I want to add user account (standard user) with aspshell via terminal. Any tips? Thanks.
0
votes
2answers
160 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 ...
0
votes
2answers
7k views

Can't start Octave 3.8.0 in GUI mode

I installed Octave 3.8.0 using homebrew. The Octave official FAQ says I can use --force-gui option to start octave with the GUI. But when I use octave --force-gui command in the terminal, nothing ...
0
votes
1answer
31 views

How do I add the Applications folder to the terminal PATH?

For example, I have Sublime Text that I can open from Spotlight. However, sometimes I'm navigating with the terminal and I want to do sublime source.php, but since I don't have the sublime app ...
3
votes
3answers
857 views

Terminal/iTerm2 issue: reverse-i-search trims off command

I've been having this issue since 10.9. cd into a reasonably long path, e.g., cd /Volumes/Storage/backup/long/path Enter a moderately long command, e.g., curl -X GET http://localhost:8888 ctrl+R, ...
1
vote
0answers
12 views

Pipe multiple homebrew commands

I installed pup using Homebrew and my shell - Zsh, with OhMyZsh - is not recognizing the command when I use it multiple times using pipes. For example, this works fine: cat index.html | pup 'meta' ...
0
votes
0answers
18 views

How to Extract ENVI picture details for Matlab?

I am studying pictures where I need to separate psf images with sufficient ENVI header file for the function multibandread in Matlab SIZE = [LINES, SAMPLES, BANDS] SUBSET = {DIM, METHOD, INDEX} X = ...