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)

2
votes
3answers
82 views

Find executables associated with Homebrew Formula

Some Homebrew formulas have names that do not correspond with any of the installed commands (e.g., coreutils, speech-tools), other formulas provide an command that matches up with the name, but also ...
2
votes
2answers
288 views

Terminal command that gives the type of computer you're on

I am running MATLAB code on two different computers, both with the same username. I would like to distinguish between the two Macs by having the code identify that one system is a desktop, and the ...
3
votes
2answers
420 views

Any way to reboot a iDevice that is connected to a USB port via terminal (Mac terminal)?

So, I am making a program to reboot iDevices (if there power buttons are broken), is there any way to induce the iDevice to reboot via the Mac shell?
6
votes
3answers
11k views

How to start OS X applications from the command line with optional arguments?

I am looking for an easy way to start different GUI OS X applications from the command line and with different parameters. If possible I would like to add them to the system PATH in order to call ...
1
vote
0answers
37 views

How to compare files for an entire drive from a before and after (or changes during) state?

I would actually very much like an option similar to fseventer, but it appears that not only will it support recent OS releases, but that it is altogether no longer available. What can I do for 10.10 ...
2
votes
1answer
267 views

Unable to set DYLD_FALLBACK_LIBRARY_PATH in shell on OSX 10.11.1

In shell scripts used for unit testing with dynamic libraries in a directory other than the typical @rpath, I have previously been able to set DYLD_FALLBACK_LIBRARY_PATH to set the directory ...
1
vote
0answers
30 views

Can MacOSX 10.7 open tar.lzma files [closed]

Can the tar command included by default on MacOSX 10.7 open tar.lzma (or tar.xz) archives? If it helps to answer I have a sample file here. You could test by opening a Terminal and issuing: curl ...
1
vote
2answers
1k views

How to install and setup s3fs on OS X 10.7 (Lion)

I installed s3fs, a tool that allows mounting Amazon S3 buckets as a file system. I created folder for mounting in /mnt/s3 then I created a file in /etc/passwd-s3fs with the content ...
0
votes
0answers
44 views

Finder can't handle objects of this class

I am following the instructions on this website Optimize CS:GO... trying to run this script in AppleScript Editor. set myfilepath to "Users:MYUSERNAME:Desktop:Counter-Strike Global Offensive.app" ...
3
votes
1answer
325 views

How to open files via Terminal

I want to open videos and pictures from Terminal. Is there any way to do this?
1
vote
1answer
84 views

Automating Terminal Commands with AppleScript

I have an Arduino-based device (www.picobrew.com) and needs firmware updating. The company wrote a little app to do it for Windows users, but us OS X users are out in the cold. Fortunately, we were ...
5
votes
1answer
5k views

Why is a command line change to ~/Library/Preferences/com.apple.LaunchServices.plist not effective immediately?

When the Info window of Finder is used to associate files of a particular type with an application: the preference is effective immediately. When Terminal is used to make a comparable addition ...
6
votes
1answer
14k views

How do I find what packages I've installed via terminal?

I've been learning the shell for a few weeks and have installed several packages. I know/remember what some of them are, like oh-my-zsh and emacs 24 (which was a nightmare to upgrade to), but not sure ...
2
votes
0answers
36 views

Terminal Change text appear area to bottom right

I want my terminal to have the prompt lines (I don't know what to call them) come from the bottom of the terminal window, and be fixed to the right of the screen, not the left. Is there any way to ...
3
votes
2answers
135 views

How can I set the Mac OS X terminal history to act like linux when using up/down arrows?

I'd like for the mac os terminal app to scroll through my command history the same way that it work in linux, if possible. Currently, if I push the up arrow in the terminal, it will scroll through ...
0
votes
1answer
18 views

Using Tag how do I cut and parse file paths into tags

I'm using Tag and Hazel and I'd like to recursively go through files on our server, obtain their file paths and filenames and parse the whole thing into tags to apply to the file. Is there a shell ...
4
votes
2answers
1k views

How to execute a Parallels Windows application with command line parameters from Mac?

I am trying to call Beyond Compare Windows app to perform a file compre directly from Mac but I am block with command line argument passing. You can call Windows applications from the OS X command ...
1
vote
0answers
161 views

Dual-booting a Linux distribution on a Mac with Fusion Drive

I'd like to install a Linux distribution alongside OS X on my 2014 5k iMac with a 3TB Fusion Drive (128GB SSD + 3TB HDD). Most guides about dual-booting Linux I've found focus on regular ...
1
vote
0answers
30 views

-bash: 1: command not found - Immediately on loading Terminal [duplicate]

Upon loading my terminal (since trying to install composer globally) I'm being spammed with countless amounts of -bash: 1: command not found before I even type any commands. I'm not quite sure what ...
1
vote
2answers
2k views

Bash script not found El Capitan

I have created a Bash script that simply does ls -l. In Mavericks and older versions of OSX I simply made a symlink to the script and put it in the /usr/bin folder (ln -s ll.sh /usr/bin/ll) and I ...
2
votes
1answer
101 views

Where can I get formail for OS X El Capitan (10.11)?

I was using formail in a utility script, but it disappeared when I upgraded to OS X El Capitan (10.11)? Apparently, it and procmail are gone. What's a good way to get formail? Build it from source? ...
5
votes
3answers
131 views

Use mdfind to identify all encrypted dmg?

Can someone suggest a clever way to identify all dmg that are encrypted? My only idea is rather complicated. use mdfind '(kMDItemFSName=*.dmg)' and then test the response from hdiutil imageinfo and ...
1
vote
1answer
25 views

Mucked up disablement of Notifications Center

Tried to disable Notifications Center and remove it from the menu bar, unfortunately didn't copy the whole command: launchctl unload -w /System/Library/LaunchAgents Now I'm presented with a ...
1
vote
0answers
46 views

Profile Manager: Using command line, is there a way to print/lookup iOS apps by at least title, that are associated/available in Profile Manager

Restating my question: Using command line, is there a way to print/lookup iOS apps by at least title, that are associated/available in Profile Manager Goal/Context: I am looking for a way to automate ...
1
vote
1answer
33 views

Dropbox and locate?

I frequently use the locate command to find files on my machine, but it doesn't index the Dropbox folder. I can't find any way to configure the folder selection. Is there a way to include dropbox in ...
2
votes
1answer
19 views

What would cause a CLI utility to ignore arguments except when invoked directly?

Okay, so this just happened: iMac:bin nreilingh$ tree --version . |____tree iMac:bin nreilingh$ which tree /usr/local/bin/tree iMac:bin nreilingh$ ls -l /usr/local/bin/tree lrwxr-xr-x 1 nreilingh ...
1
vote
0answers
39 views

plutil returns error when a string numeric key is used

I'm trying to insert a row to a plist by using the following command plutil -insert "160" -string "hi" file.plist However the system was not so happy about the fact that I was using a numeric key ...
1
vote
2answers
226 views

How to determine public temp directory on OS X to be write-accessible by www server?

I've MAMP running httpd server as _www and I'd like to assign the temporary directory as part of the shell script (bash). I've tried to use $TMPDIR as per these posts: How do I find the 'temp' ...
0
votes
0answers
41 views

Running shell commands from netcat

I have a shell script that I am serving up through netcat - I'm using this as an experiment to learn more about unix I can now do nc 127.0.0.1 1234 | sh and it will pipe the script commands into the ...
0
votes
0answers
44 views

Run Automator workflow or shell script at application launch/shutdown

As the title says, I'm looking for a way to run an Automator workflow (or a shell script) when I launch a specific application. When I shut down the application, I want to run another workflow/shell ...
2
votes
2answers
305 views

How to repair permissions after removing the group wheel from several items?

Is there a command in Single User Mode to recover/reinstall the start-up wheel (with root its user access). I removed wheel as a group from any file/folder it had permissions for or access to. I ...
8
votes
2answers
402 views

Check if caps lock on in terminal

Is there a way to query the system to tell if the caps lock is on or is off from the command line in terminal.app?
1
vote
1answer
58 views

“lsof -i” Command output explanation

i am attempting to maintain a closer eye on my Apple-Mac's outgoing and incoming connections; in collaboration with other processes such as tcpdump and netstat, i have been using the command: lsof -i, ...
3
votes
2answers
916 views

How can I determine if the screen is asleep in Mountain Lion, from the command line?

I have a script that needs to run every so often, but only if the screensaver is active or if the screen is asleep (to make sure nobody is actively using the computer first). I need to have a way to ...
1
vote
1answer
52 views

Run Terminal Command from .terminal file

I just figured out how to export settings from terminal which creates a .terminal file. And I realize that the ExecutionString parameter has changed to the CommandString parameter. I put a command in ...
1
vote
1answer
48 views

git auto-complete branches with checkout alias

There's this neat script to autocomplete git branches. It works fine with git checkout <tab>. But, I want to take it further. I have a checkout alias: alias co='git co'. How can I make branch ...
1
vote
3answers
56 views

Change html files to txt on entire folder

Is there a mac terminal command to change all .html files to .txt including the files in sub folders too?
0
votes
1answer
122 views

Any reason not to change the root shell to bash?

The default shell for root (at least on Yosemite) is /bin/sh. Would there be any problem to changing it to bash (or better yet zsh)? As far as a I know bash at least is backward compatible. I need ...
3
votes
2answers
349 views

Starting and stopping mysql server. Shorten and make automatic

Currently I start and stop mysql with the following command sudo /usr/local/mysql/support-files/mysql.server start sudo /usr/local/mysql/support-files/mysql.server stop It is quite a long ...
1
vote
0answers
141 views

Command line tool for interacting with Bluetooth Low Energy devices, similar to gatttool

I've just found out that some Python code I've got working on Linux also needs to work on OSX. For reliability reasons, on Linux I've been using a cludgy but effective approach to reading and writing ...
4
votes
2answers
1k views

Using the -Bless Command on Multiboot Macs with 10.11 El Capitan

As part of our standard deployment, we tend to deploy multiple OSs on Macs, from 10.7 to 10.11. However, with the new SIP (System Integrity Protection), the -bless command no longer works properly. I ...
17
votes
3answers
14k views

Is there a command to install a dmg

I want to install a dmg file on a remote server. All I have is an ssh access. Since a DMG is a disk image, I tried to mount it, but mount does not seem to recognize its format. file says my dmg file ...
0
votes
2answers
54 views

Softlink /bin/bash to a brew-installed bash

It is a question related to this other one, but I can't comment. I've updated to use bash 4 from brew installation. But I don't know if changing all the header scripts from: #!/bin/bash To ...
0
votes
1answer
96 views

.profile is not loaded on non-login /bin/sh

The problem is in the title, but let me add few details here. I am running on OS X 10.10.5 (14F27). Using default Terminal.app. Content of config files Content of /etc/profile echo " # reading ...
2
votes
0answers
17 views

bash: ping: command not found [duplicate]

My shell can't find ping. $ ping -bash: ping: command not found $ uname -r 14.5.0 $ echo $PATH /usr/local/bin:/usr/bin:/bin:/Users/alex/.cabal/bin $ which ping $ However, man ping works and ...
6
votes
2answers
2k views

Mac renames itself automatically - host name is incorrect in terminal

I've got a handleful of macs (all with unique names) and on occasion it prompt a notice about saying another computer on the network as this name and adds a (2) or (3) to my mac. How can I set the ...
4
votes
1answer
69 views

Automate Yosemite Upgrade

I want to be able to launch the Yosemite Installer app from the Applications folder and install the upgrade with commands. When I look inside the InstallESD.img there are many PKG files, I am unsure ...
1
vote
5answers
110 views

How to remove top and bottom lines from a file using sed, awk, etc. in 1 step

I want to chop the top 13 and the last 6 lines from a file There are several answers on unix/linux but they aren't working for me as the sed options used aren't available on osx, tac isn't available, ...
2
votes
1answer
77 views

Ext2 utility “e2cp” alternative for OS X

In my linux machines, I use the command line utility e2cp to copy files from and to ext2 disk images. Unfortunately, OS X does not provide any ext2fs utility out of the box. Is there a version of e2cp ...
1
vote
2answers
1k views

Yosemite supplied curl stopped supporting https

I am having the issue that curl is failing to deal with https, and thus I cannot update Homebrew: brew update && brew upgrade fatal: unable to access 'https://github.com/Homebrew/homebrew/': ...