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
48 views

Downloading additional voices from command-line

I am using a MacOS X server (to which I only have command-line access) to convert text to speech which is saved to sound files (using PyObjC). I would like to install some of the optional OS X voices ...
1
vote
1answer
179 views

Controlling audio output's sample/bit rate on OSX from command prompt

Is there a way to limit the output format of a soundcard on OSX, apart from Audio MIDI Setup? I have noticed that OSX has a bad habit of resampling audio while it is not needed at all (say the output ...
0
votes
0answers
125 views

Command line app to change screen resolution with RETINA?

I'm looking for a command line app to change screen resolution. I've tried cscreen, screenresolution, and scrutil. The first two work to change resolution, but they do not enable retina scaling.
1
vote
0answers
20 views

How to see the commands echoed on the Terminal?

Maybe is a silly question but I'm a newbie in OS X and I didn't found the answer anywhere. The thing is that when I execute some command that executes other scripts/commands/whatever I don't see on ...
1
vote
0answers
52 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
671 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 ...
2
votes
2answers
320 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 ...
1
vote
0answers
48 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 ...
2
votes
1answer
146 views

Backup files from corrupt disk to usb drive in single user mode

I try to backup my files of a corrupt system. I can start into the single user mode and want so store my home folder to my backup system. To mount my usb drive I need to mount the root disk as ...
4
votes
1answer
6k views

How to open files via Terminal

I want to open videos and pictures from Terminal. Is there any way to do this?
0
votes
0answers
89 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" ...
2
votes
0answers
47 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
307 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 ...
1
vote
0answers
260 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 ...
0
votes
1answer
21 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 ...
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 ...
2
votes
1answer
164 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? ...
3
votes
3answers
154 views

Display interactive notifications (with buttons) via Terminal

I'd like to let my bash shell scripts to display gui notifications with two buttons that the user can click and then execute some commands depending on the button pressed. What options exist?
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
77 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
2answers
3k 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 ...
5
votes
3answers
142 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
38 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
26 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
57 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 ...
0
votes
0answers
58 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 ...
1
vote
2answers
459 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
109 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 ...
1
vote
1answer
83 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, ...
8
votes
2answers
466 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?
2
votes
2answers
588 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 ...
1
vote
1answer
78 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
63 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
188 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 ...
2
votes
0answers
251 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 ...
1
vote
1answer
78 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 ...
2
votes
1answer
93 views

How to evaluate the state of the OS X Server.app from a shell script?

I need to evaluate if the OS X Server.app has been installed and if it has been started or not. This I need to do from within a shell script. I could check for existing folder names, but I would ...
4
votes
2answers
2k 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 ...
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 ...
0
votes
1answer
160 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 ...
1
vote
1answer
36 views

Root login using stdin

Can anyone tell me why this does not work? test:~ test$ echo 123 | su root su: Sorry Thanks
4
votes
1answer
50 views

How can I log all notifications?

Dropbox, PushBullet, Thunderbird and a dozen other apps create notifications. Is it possible to log these in a Unix-like way? I dislike the tiny messages popping up for a few seconds and then ...
2
votes
1answer
95 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 ...
0
votes
2answers
77 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 ...
2
votes
0answers
91 views

Connect to server on command line

I am currently trying to connect my NAS on OSX 10.9.5 using the command line. This will work fine if I first connect my NAS using Finder: I select it in the "Shared" section of Finder's sidebar, click ...
0
votes
1answer
37 views

CLI Solution - Stripping File Attributes - LSOpenURLsWithRole()

I am getting this error when trying to execute an unsigned application that was downloaded via the native web-browser; Safari.app. LSOpenURLsWithRole() failed with error -10810.. There used to be a ...
1
vote
0answers
36 views

Command line replacement for tmutil

Anyone know of a command line replacement for tmutil, either script or binary? Failures of tmutil: Does not log. No meaningful diagnostics. Cannot resume interrupted restore. Cannot overwrite ...
4
votes
1answer
485 views

Using python screws up the shell (and/or terminal?)!

The problem Simply opening and closing the Python sub-shell screws up my shell (or possibly the terminal?). It seems to remove the shell's ability to print any text I enter, including newlines after ...
4
votes
1answer
89 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 ...
2
votes
2answers
59 views

automatic save before “Run in Terminal” in BBEdit

I am a new BBEdit user, with a long experience as TextWrangler user. In TextWrangler, I am used at running python scripts with the command "Run in Terminal", and in TextWrangler the default behaviour ...