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
2answers
49 views

Recursively remove all invalid characters from text files in place

I have several thousand text files, some of which contain invalid UTF-8 characters. I want to recursively remove all invalid characters from these files in place. I am aware that many similar ...
2
votes
1answer
21 views

Send args to Firefox when launching from terminal

Additional arguments on start of Google Chrome from Terminal app are send in a following way: open /Applications/Google\ Chrome.app --args -myArgs="ARGS" What is the syntax to sending arguments ...
0
votes
0answers
32 views

change HTTP headers of Chrome and Firefox

Browsers send HTTP Accept headers. This is an example of one: text/html, */*; q=0.01 gzip, deflate en-US,en;q=0.8,sl;q=0.6 You can get yours here. How can I change curent headers from terminal app ...
1
vote
1answer
267 views

How do I show all hidden & invisible files on the command line (both .files and invisible flagged files)?

Is there a way to show only the hidden and invisible files in a directory using the command line? For instance ls -a | grep "^\." will show all the files hidden by a period as the first character, ...
5
votes
2answers
5k views

LSOpenURLsWithRole() failed with error -10810 Can't open 'Install OS X Yosemite.app'

I'm trying to install OS X Yosemite through 'Install OS X Yosemite.app' downloaded from the Internet. When I try to open it by double clicking it, nothing happens. When I use the terminal I get the ...
1
vote
2answers
37 views

Why doesn't pbpaste return cursor at new line in bash?

I run the command pbpaste in Terminal (bash) to get the result of my clipboard, but unlike other commands which leave the cursor at a new line below the previous stdout, pbpaste leaves it to the right ...
-1
votes
1answer
3k views

How to add a script that types in the password for my vps through applescript

I made a script recently and have turned it into an app, it basicly logs me into my vps via ssh but I don't know how to tell it how to type in my password for me, heres the code tell application ...
0
votes
0answers
10 views

Make Background Terminal Window

Is it possible to make a terminal window the "background" in OS X El Captain? I've looked at several applications. For example, TotalTerminal, but it is defunct.
4
votes
2answers
481 views

How to turn off the Terminal's “Allow mouse reporting”?

Every time when opening an new Terminal window, the View -> Allow mouse reporting is always checked. And everytime i must press CMD-R to disable it. Is here a way how to disable it by default?
0
votes
0answers
17 views

Silent installer for remote machines

I am trying to create a script to install logmein silently (or in the background) with out enduser input. I have the process to download the zip and create an admin user (for later login) however I ...
0
votes
1answer
37 views

Opening a specific page on Mac Preview from Terminal

How I can modify the open filename.pdf command so that I can open a desired page number directly without having to scroll down.
0
votes
1answer
23 views

How do I make git credential-osxkeychain work correctly when I'm connected to a machine via SSH?

I setup a build machine to check out sources from Github by caching the login credential in the keychain using instructions from: https://help.github.com/articles/caching-your-github-password-in-git/ ...
0
votes
0answers
26 views

change firefox proxy from terminal

How can I change proxy for Firefox from Terminal app? Not the whole computer proxy settings (the ones in Network tab), but just Firefox's.
3
votes
2answers
21k views

Error: “The operation can’t be completed because one or more required items can’t be found. (Error code -43)”

I accidentally pulled an NTFS hard drive out of my Mac OSX Mavericks machine several times and realized that I accidentally created multiple entries of many different names in my /Volumes/ folder. Now ...
1
vote
0answers
21 views

strange network issue after new router 'unkownXX…' terminal promt instead of Name

Some weeks ago I got a new router* and since then I encounter some local network issues from time to time (at the moment I can’t reproduce when this happens): Wifi is connected but webpages don’t ...
2
votes
0answers
24 views

Open applications in the background in OS X, I don't want my focus taken from me. Respect my Focus!

I'm running El Capitan 10.11.4 on a 2014 Mac Mini. I'm often running 10-14 apps at one time as I work writing reports, word/excel/Adobe/Safari/iTunes/calendar/etc... Frequently I want to open ...
4
votes
3answers
248 views

Remove iterm from cmd+tab apps

I was using TotalTerminal to get visor like terminal on a shortcut. But TotalTerminal is abandoned so I have switched to the iTerm2. My problem is that when I use a shortcut to trigger iTerms visor ...
2
votes
0answers
88 views

Issues with files and folders with names containing umlauts

I have just noticed some issues browsing my external music collection using Finder, certain artists folders were missing. Going to iTerm and lsing the folder I got this as the initial report: ls ...
0
votes
1answer
55 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
249k 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
212k 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
19 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
35 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
50 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
151 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
62 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
25 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
35 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
27 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
21 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
237 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
83k 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
49 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
12k 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
63 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 ...
12
votes
6answers
15k views

Waking display from terminal, general waking

This is a two part question. A practical, "how to" question is first, and then I ask for configuration suggestions. First, I put my displays to sleep at night, and I would like to be able to wake ...
0
votes
1answer
551 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
13 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
38 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
56 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
40 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
460 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
531 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
412 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?