Using programs and commands that do not have a graphical user interface (GUI) but are rather controlled by typing text commands into a terminal program, or shell.

learn more… | top users | synonyms (2)

1
vote
1answer
41 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
2answers
154 views

Configure OS X to pass incoming traffic to another server?

I have a PC and a 2011 Mac mini on one wireless network, which does not have Internet access. The Mac mini is also connected to another network which has Internet access. Is there a way I can share ...
3
votes
1answer
51 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
1answer
99 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 ...
1
vote
1answer
79 views

Control haptic engine and force touch from terminal

Is there any way that I can create haptic feedback with the integrated force touch trackpad on my rMBP using a terminal command (preferably without AppleScript, but if that's the only way, then sure.)?...
1
vote
0answers
66 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
61 views

Set Static IP address of local Interfaces in Mac OS X with Unix Script

I need little help regarding the setting of the static IPs and net masks of the various interfaces. I have a Mac client which has two physical interfaces. One interface is used for the "house ...
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?
0
votes
1answer
92 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?
1
vote
1answer
104 views

What is the crlcache keychain and why do I have so many of them?

I run the keychain command-line app that allows me to fast-sleep my Mac or quickly lock a keychain. However, it seems to think that I have many crlcache keychains: When I search for crlcache on my ...
0
votes
2answers
56 views

How do I run a terminal command for different values

How do I have to label i such that the do command is repeated for all values of i. E.g. if i =2: cd /Users/xxx/zTree; wine explorer /desktop=1,640x480 zleaf.exe /language english /name lab1 cd /...
1
vote
3answers
95 views

Copy specific files and keep the subfolder structure

I got a folder with a large amount of files with different suffixes in several sub folders. My automator workflow works as follows: Ask for Finder Items Get Folder Contents (sub folder option ...
0
votes
1answer
32 views

How do I revert the sudo less /private/etc/cups/printers.conf command?

I have used the above command to try and find my printer's address using the web. Now I would like to revert this setting using terminal. Can anyone help me with this? Thanks in advance!
1
vote
1answer
95 views

How to install Monkeysphere on OSX El Capitan

I tried to install Monkeysphere via Homebrew but it complains of an unmet dependency. monkeysphere: Unsatisfied dependency: Crypt::OpenSSL::Bignum Homebrew does not provide Perl dependencies; install ...
1
vote
1answer
164 views

To convert .iso file to .img file while trying to dual boot with linux

It says no such file or directory.where did I go wrong?
0
votes
0answers
56 views

grep doesn't work on big files on OS X 10.10

grep works on OS X 10.6, detecting string in a big binary file. It still works on OS X 10.10 on a small file. On OS X 10.10: $ grep -bao string small_file offset : string ... $ grep -c string ...
1
vote
1answer
253 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" ...
4
votes
1answer
558 views

Can I view history of recently connected USB devices in OS X?

Is it possible via the Terminal in OS X to show a history of recently connected USB devices. For example I want to know the specified ID of the MP3 Sony Walkman which I plugged into my MacBook Pro two ...
1
vote
1answer
50 views

How to change icon of an app through Terminal

I want to customize my app icons, but there's a lot of them, and I don't want to be tedious and go through the whole Get Info process over and over again. Is there any way to write a program, ...
1
vote
2answers
208 views

set PATH in terminal OS X 10.11.3

I need to set path /usr/local/gnupg-2.1/bin to the command line. I tried to enter "export PATH=/usr/local/gnupg-2.1/bin:$PATH" in the command line, but it works until the terminal session ends. I ...
0
votes
1answer
38 views

Detect Terminal Color “Theme” from Command Line

When one uses the terminal inspector, one can change many properties of the terminal, such as background color, text color, and selection color. How can I detect what these properties have been set ...
1
vote
3answers
55 views

Missing bash prompt

My bash prompt is missing as shown on the image. I'm not even sure how to open the .bash_profile since dot files are hidden in the finder. I restarted the machine to no avail.
0
votes
2answers
40 views

Are there replacements for the reg commad on Mac OS X 10.9

I believe reg existed on 10.8 and lower as documented here - https://developer.apple.com/library/prerelease/mac/documentation/Darwin/Reference/ManPages/man1/reg.1.html However, in OS X 10.9 I only ...
7
votes
1answer
163 views

How do I use non-“legacy” launchctl commands to load and unload plists?

I have some plist files in ~/Library/LaunchAgents. I have been happily using launchctl load -w and launchctl unload -w to turn these on and off for years. However, I notice that now load and unload ...
1
vote
1answer
55 views

unable to install homebrew

unable to install homebrew I am using this command. ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" getting this error. i have already installed updated ...
1
vote
1answer
50 views

All applications got paused after disk space usage got near 99% and back to normal. What's next?

Mac does some pretty fancy background stuff to try and keep enough disk space for whatever it needs. In my case, 512 gb ssd, it needs to have at least 20gb free to run smoothly, so I usually have 40. ...
-1
votes
1answer
144 views

Is there any way to view iOS device logs on the Terminal?

Is there any way to view iOS device logs on the Terminal? Do the logs get stored in any file?
0
votes
2answers
167 views

terminal: how do i pipe the results of grep to open a file

I'd like to grep and open a file in just one terminal command. Suppose I'm in this directory: $ ls 1.txt 2.txt 3.txt 4.txt 5.txt and I want to open 3.txt I thought I could do ls | grep 3 ...
4
votes
1answer
5k views

How do I create user accounts from the Terminal in Mac OS X 10.11?

I would like to be able to create new users in Mac OS X 10.11 remotely after ssh'ing into the machine. On Mountain Lion, these steps were listed. Running dscl . -create /Users/joeadmin dscl . -...
3
votes
2answers
393 views

Easy way to execute shell script

I want to be able to search in Spotlight for a shell script (or something that calls a shell script) and that such shell script opens a Terminal window so the output is shown live (and I can interrupt ...
0
votes
1answer
56 views

Unable to install with admin

I am trying to update MAMP MySQL from this link, but when i double click the file as mentioned in the blog. I get message saying, The file “Install_MySQL_5.6.25.command” could not be executed ...
2
votes
0answers
32 views

Why would “ls -R” on a mounted CDROM fail with e.g. “ls: notes: No such file or directory”

I popped an old CDROM into my computer and executed ls -lR /Volumes/CDROM and received dozens of error like this: ./notes: ls: notes: No such file or directory but /Volumes/CDROM/notes does ...
0
votes
2answers
32 views

How to put Wifi card in monitor mode?

When I run tcpdump, I do so after having connected to an access point. Is there a way to run tcpdump without having connected already?
1
vote
1answer
69 views

how to throttle Internet bandwidth?

In previous releases of OS X, there was a command called ipfw, that permitted throttling of network bandwidth, which is useful for running some kinds of tests on software. It appears that as of ...
0
votes
2answers
43 views

Run command line tools as separate app

Is there a way to run command line tools as a separate app, so I can easily switch between them with apple+tab etc? I want this for things like a mail and irc client where I don't want to hunt down ...
1
vote
1answer
214 views

OSX Terminal no longer save my commands in history

Here's my issue. Last week I realized that my OSX (10.11.13) Terminal no longer saves the command I execute in the history file(s). To be more clear: I type the command test On the same terminal ...
1
vote
2answers
570 views

Exiting/Starting the Terminal (El Capitan)

In the latest Mac OS X Terminal version I noticed that if I type exit and the press Enter, I get the following: Last login: Wed Jan 27 09:18:48 on ttys000 Ian-iMac:~ Ian$ exit logout Saving session......
0
votes
1answer
75 views

Can I programmatically install a specific version of JDK (i.e. using command-line tools only) on OS X?

I know you can apt-get JDK on Ubuntu. Is there anything similar on OS X? It looks like Oracle requires you accept a license agreement on http://www.oracle.com/technetwork/java/javase/downloads/jdk7-...
0
votes
2answers
34 views

Backward compatibility of shell scripts

I use a .command file to start a basic shell script in the form: #!/bin/bash -- this simply starts Something at /usr/local/bin/Something myLittleOneLineScript To make it work I changed its ...
1
vote
1answer
80 views

Can't seem to redirect input in Terminal

I'm having issues getting redirection to work in Terminal. I'm in a C++ class where we have to create an application, then find that application in the Terminal and place a text file in the same ...
2
votes
0answers
53 views

Issues with Anki and BasicTeX

My last Mac worked with Anki to display LaTeX formatted equations but I am still, but I haven't been able to transfer it over. My steps thus far: I obviously downloaded and installed Anki and ...
1
vote
1answer
109 views

sudo and some other system commands not working with platypus

I am making a shell script that works great on its own, but does not work correctly when packaged with Platypus. It does not want to execute sudo, and a few other system commands. Are there any work ...
2
votes
2answers
318 views

Is it impossible to delete/move a file named “␀” on mac?

When I try to move, rename, or delete a file named ␀in Finder, I get this error message: The operation can't be completed, because an unexpected error occured (error code -50). With mv, rm or ...
0
votes
0answers
133 views

Why does Image Magick fail to read fonts?

I'm trying to create a simple contact sheet of all the photos in a directory using Montage: $ montage -font Helvetica -pointsize 10 *.png contact_sheet.jpg However, I keep getting a error reading ...
3
votes
2answers
339 views

Upgrade OS X operating system from the command line

You can upgrade software with sudo softwareupdate --install --all. Is it possible to upgrade the OS itself from the command line?
1
vote
1answer
57 views

FTP file to specific path on server

I try to FTP a file with a one liner in a shell from a mac to a folder on my server. Doing the same in the FTP-Shell is not a problem for me, but doing this in one line is not possible to me. I even ...
0
votes
0answers
96 views

Set default user in terminal

I just formatted my Mac and upgrade it to El Capitan, When I open Terminal I see that I am always logged in as root: How can I get my usual user name every time I open a new Terminal window, I ...
8
votes
2answers
648 views

How to download Firefox via command line FTP

I am attempting to install Firefox on my Mac, which currently does not have a browser. From a bash terminal I have ftp installed and am currently connected to the internet. However, I have been ...
0
votes
0answers
51 views

Schedule executing tasks based on bash scripts using CronniX

I'm still quite new you Mac and OS X but do have some background about other UNIX based systems, so please excuse for any misunderstandings. My goal is to implement a function that executes certain ...