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)

5
votes
1answer
2k views

-d option for split is illegal on OS X 10.9

I have bash script that works on Ubuntu but for OS X 10.9 i get the error for split command: split -b 1000000 -a 3 -d $F $F && rm $F || { echo "Error: 'split' command not installed" ; exit 1 ...
3
votes
2answers
3k views

How can I set the display settings using command line

I would like to configure the 'Scaled' property of my Macbook Pro display using the command line. How could I do that?
3
votes
2answers
140 views

Where Is Darwin's ARP Cache?

The Linux kernel generally tends to cache its ARP tables here: /proc/net/arp. Darwin & Mac OS X, however, do not seem to follow the same convention. So where can I find the Darwin & Mac OS X ...
1
vote
1answer
73 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 ...
0
votes
1answer
75 views

Help converting Apple Script to Shell Script

This Apple Script works great to mount the logged in Active Directory users network homedrive as a mounted network drive but we currently have it running as an App at login via "Login Items". ...
1
vote
1answer
52 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
52 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
250 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?
0
votes
0answers
73 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 ...
3
votes
1answer
76 views

Why does this cause Mac OSX to print over SSH?

While screwing around and breaking things I came across these stupid commands (if executed in order it causes what I got): cd / && cat vmlinuz cd /boot/ && cat init* It causes ...
8
votes
2answers
570 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 ...
6
votes
1answer
1k views

How to access /dev/mem in OSX?

How I can access /dev/mem (or /dev/kmem, /dev/pmap) equivalent device in OSX? As far as I know it was removed in some point. Can I create this node manually somehow or any other way of dumping the ...
0
votes
0answers
42 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 ...
1
vote
3answers
54 views

Create a custom terminal window

is it possible to create (and put in the dock) a custom terminal window? What I mean with "custom": it should have a different name (eg. "myTerminal"); it should automatically start running a ...
0
votes
0answers
76 views

How to set a Mac with Retina display's scaled resolution via command line?

I write a shell script I just have to launch it to completely set my Mac up. On long-term, I plan to make patched custom Mac O.S. builds that'll be first patched of security flaws, automated to set ...
5
votes
1answer
85 views

AppleScript : Set do script result as variable

I would like to get the result of this search and display the result in a notification or safari popup. " set result to do shell script "curl https://www.binlist.net/json/" & cc without altering ...
0
votes
1answer
33 views

How to get local directory names into terminal window titles?

The title of my terminal window is: Terminal -- bash -- 130x39 This is how I see them listed in Terminal->Window and it is very hard to know which one is which. When I use multiple terminals, the ...
1
vote
1answer
263 views

dpkg.pm @INC dpkg-scanpackages / > Packages

I am running Max OS X 10.9 Installed: -Xcode 5 (latest version) -Fink -MacPorts -Xcode Command Line Tools -Theos I have a shell script running Dpkg-scanpackages debs / > Packages But i am ...
2
votes
1answer
465 views

How to change the default command to open shells in the MobileTerminal Cydia package

I am using MobileTerminal on iOS 7, and want to know how to change the default shell from sh: to bash:. I assume I would need to change the login command for this, but how would I?
4
votes
0answers
115 views

How to access GPS data from command line on jailbroken iPhone

Are there any binaries available via the command line to get information from the GPS on a jail broken iPhone? I've searched through Cydia and haven't found anything, but I wouldn't imagine this ...
0
votes
2answers
380 views

Is there a way or a tweak to make Siri execute shell commands

Indeed I have a home automation system, I would like to integrate a voice control system and for that I need to be able to call shell commands like curl. I have seen many Siri tweaks but none of ...
1
vote
1answer
40 views

Cannot install libsodium via commandline

I am trying to install libsodium using ./configure --prefix=/usr make sudo make install In the install step, I get this error: usage: install [-bCcpSsv] [-B suffix] [-f flags] [-g group] [-m mode] ...
0
votes
0answers
57 views

Is there a command or script in mac OS X to set the creation date to match the modification date?

Somehow, the creation date of all the photos on my USB drive has been updated to a recent date, but the modification date remains untouched. So any photo app thinks the photos were just taken recently ...
1
vote
1answer
66 views

Permissions corrupted in OS X

I have run sudo chown -R Ankur / by mistake and now some apps are not opening and there icons are also not visible. How can I fix this? Here are some snapshots:
4
votes
2answers
140 views

terminal custom commands source every time

After following this comment I added all my startup/alias commands to ~/.bashrc file and in ~/.bash_profile I added source ~/.bashrc But still my aliases are not working. I have to manually source ...
1
vote
1answer
195 views

How to open path in Double Commander from Terminal

If I type open $(pwd) or open /anypath/ I will get the path opened in Finder. How I can achieve similar results but with the path opening in Double Commander instead?
0
votes
1answer
72 views

Is $PATH just a file with a list (in order of preference) of directories?

I'm having trouble understanding exactly how $PATH works? I am on a Mac.. If I install Python with Homebrew, it will install Python into the /opt/local/bin directory. Now assuming Homebrew didn't ...
-1
votes
1answer
63 views

What is actually happens when moving a file onto/into another file?

I was trying to move some files to a directory, because of wrong destination directory path all files are moved to another file. Can I undo this action to get my files back? - Hopefully NO Is there ...
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 ...
1
vote
2answers
53 views

Why does my iTerm2 launch with an X in it's path?

After upgrading to El Capitan, then working on installing Rails, my iTerm2 shell now opens with x >, instead of just >. Can someone please explain why this is happening, and help me figure out ...
0
votes
1answer
202 views

OS X El Capitan: man, command not found

Today I was trying to update openssl in my MacBook Pro with El Capitan 10.11.2. I don't know where I made a mistake but it seems I have accidentally disabled man. In fact, if I launch man ...
35
votes
4answers
20k views

MacPorts vs. Fink vs. Homebrew [duplicate]

I always used MacPorts to install and maintain my GCC compilers and other programs. Now I've heard about Fink and Homebrew. It seems these two utilities are gaining ground in the Mac community, but I ...
0
votes
2answers
42 views

Is it possible to set the JAVA_HOME env in El Captitan?

I am unable to set the JAVA_HOME environment variable osx. I added the following line to my .bash_profile export JAVA_HOME=`/usr/libexec/java_home` and sourced it afterwards; yet when I printenv or ...
5
votes
4answers
1k views

pbpaste, pbcopy using wrong pasteboard?

I'm converting a shell script which xclip and similar tools on Linux, to use pbpaste and pbcopy on Mac. The problem is the default pasteboard ('general' according to the man-page) for these tools is ...
0
votes
1answer
53 views

OS X Terminal: 'ls' shows program but then says command not found?

I am trying to start MongoDB from the terminal. When I navigate to the folder and hit 'ls', all the applications show up but when I type in the name of the application( 'mongod'), it says it is not ...
3
votes
3answers
150 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?
166
votes
8answers
87k views

How can I trigger a Notification Center notification from an AppleScript or shell script?

I'd love to be able to take advantage of 10.8's Notification Center features in AppleScripts and shell scripts I write. Is there a built-in command or a third-party library I can use from either an ...
4
votes
1answer
646 views

How can I “Open an app from an unidentified developer” without using the GUI?

Basically, I used the native Safari.app web browser to download a third party application and I want to run / open it from the comfort of my bash shell / Terminal.app CLI; despite the following error ...
1
vote
1answer
329 views

Manage login items from terminal in 10.11 El Capitan

Previously, % launchctl submit -l label -- command args was the way to go. This does not work in 10.11.2, I'm fairly sure it was working in 10.10.x, but cannot be certain. The likely-looking ...
3
votes
3answers
246 views

Can Safari's download popover window be made wider?

How can the max. width (fixed width≈425) of Safari's download-popover-window be made wider? Is there a way to get at Safari's "download pop over window" in any way so its max-size is larger than 425 ...
92
votes
9answers
170k views

Why doesn't .bashrc run automatically?

I put some alias commands in my .bashrc file, so that they might be loaded everytime I open a new Terminal window. Yet this doesn't happen. I have to select run script: in the ...
1
vote
1answer
95 views

What does “is not recognized as an internal or external command” error mean?

I have spun up a VM of OS X since my main user is not an admin and I need to do things that require admin access. My end goal is to install the Xcode command line tools into a VirtualBox VM I created ...
3
votes
3answers
53 views

Unexpected changes to command line

When I open up a command line on my Mac the welcome message is usually Last login date Johns-MacBook-Pro$ This now reads... Last login: Fri Dec 18 23:48:34 on ttys000 Johns-MBP-2:~ johnw$ What ...
0
votes
0answers
106 views

Compiling Ghostscript in El Capitan

I'm trying to compile Ghostscript-9.18 ( i need libgs ) and I've run into the new Rootless Security stuff when I try to install the libs. How do I change the target from /use/include to ...
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 ...
1
vote
0answers
11 views

Why the service does not start after logging in

The service is jenkins installed with homebrew on Yosemite. I have this: ~/Library/LaunchAgents/homebrew.mxcl.jenkins.plist and this: % launchctl list | grep jenkins - 0 ...
4
votes
1answer
65 views

OSX: how to determine USB current draw?

I connected a device to my USB port, but it's unclear how much current it is drawing. Is there a way from the command line, or otherwise, to determine how much current that device is drawing?
2
votes
1answer
6k views

How to repair and/or reinstall Homebrew safely?

I am trying to repair Homebrew. I recently tried to reinstall it but when I typed "brew doctor" My output was: shell-init: error retrieving current directory: getcwd: cannot access parent ...
5
votes
2answers
746 views

grep: command not found

This is a very weird behavior. Lately, whenever I am trying to find a process on console with ps aux | grep foo, it is returning a grep: command not found. Ok, that could be something that I changed ...
3
votes
1answer
53 views

Why is the host name in the shell prompt “MacBook-2” instead of “MacBook”?

I opened Terminal on my MacBook Pro and the prompt read MacBook-2:~ myName$. Is there something wrong? Do I need to be worried about this? Why "-2"? Thanks in advance.