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)

0
votes
0answers
74 views

Problem accessing localhost under Apache while it's running

I reinstalled Apache on my Mac (brew uninstall\install httpd22), and now access to localhost is no longer available. sh-3.2# apachectl -v Server version: Apache/2.2.31 (Unix) Server built: Mar 28 ...
0
votes
0answers
17 views

Odd behaviour for long commands after styling the terminal

After putting the following statements on the ~/.bash_profile file: # STYLING THE TERMINAL # References: # - http://apple.stackexchange.com/questions/33677/how-can-i-configure-mac-terminal-to-have-...
0
votes
0answers
31 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
120 views

Using gcc on El Capitan

I installed gcc using xcode-select --install. However, I think it's trying to compile my C code as C++ code. This is what I get when I type gcc --version in Terminal: gcc --version Configured with: -...
0
votes
0answers
8 views

Can you install a Brew formula from a different fork?

A tool I'm working with (xctool) has some fixes in a pull request that haven't been merged yet. I'd like to install from the PR's fork. Is there any way to do that?
33
votes
8answers
23k views

Can home and end keys be mapped when using Terminal?

The home and end keys on a MacBook Pro can be emulated with fn + left arrow or fn + right arrow. Or when certain settings are changed, with the Command (Apple) key instead of fn. None of these ...
2
votes
3answers
2k views

Single-user mode, data recovery, mount usb

I have a crashed hard drive. I had no luck with a USB to SATA using MacDrive Pro. I can get the drive to drop into shell with single user mode when I boot the drive. Can I mount a USB drive or ...
2
votes
2answers
96 views

What is the most OSX or Darwin-like command-line experience available (without buying an expensive Mac or hauling my production machines home)?

I want to emulate the command-line experience from OSX with a small netbook and practice my skills with the comfort of this small machine. Surely Apple offers actual Darwin Links for developers or ...
1
vote
1answer
110 views

Error while trying to create an account in single user mode on OS X Mavericks

On OS X Mavericks, I am trying to create an account using single user mode, using the following script. #! /bin/bash # create user dscl . -create /Users/hiddenuser dscl . -create /Users/hiddenuser ...
0
votes
1answer
62 views

Command line developer tools missing after OSX update

I have noticed that every time I do Mac OSX update the Command line developer tools is getting lost. I had to install it again after each OSX update. Is there a way to prevent this? Or Is there a way ...
1
vote
0answers
185 views

Curl terminal command syntax from Applescript

I want to execute a curl command in Applescript that does the following (per this SE question/answer): http://superuser.com/a/1054803/471181 ...Do an HTTP POST of the contents (as a string) of a ...
1
vote
2answers
39 views

Problem with scripted account deletion syntax

I'm working on an account cleanup script module that can handle the hidden and unhidden accounts we're creating in bulk on new MacOS systems. We've kept the logic simple to start. However I keep ...
2
votes
2answers
135 views

How do I install gnu sc on my mac?

I want to install the command line spreadsheet sc. I would prefer to do with homebrew. I need both psc and sc commands. Is there a homebrew package? If not other methods would be good.
1
vote
2answers
132 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 ...
1
vote
0answers
14 views

Pipe multiple homebrew commands

I installed pup using Homebrew and my shell - Zsh, with OhMyZsh - is not recognizing the command when I use it multiple times using pipes. For example, this works fine: cat index.html | pup 'meta' &...
1
vote
1answer
2k views

How do I create a script to create/modify local admin accounts?

This question is almost exactly what I need for my project at work. We have approx. 400 Macs on our campus, and the problem is they were not all set up identically. There are at least 4 different ...
0
votes
1answer
27 views

Edit (colorized) terminal output before printing?

A very similar question has already been asked on SuperUser but none of the answers works satisfactorily for me. I can actually get almost what I want by simply: Running the Terminal for the whole ...
1
vote
1answer
48 views

cupsfilter: Unable to determine MIME type of ““??”.**

I'm trying to convert html files to pdf files using the following command line for file in *.html; do /usr/sbin/cupsfilter “$file” > $file.pdf; done But I got the message as below and empty pdf ...
0
votes
1answer
65 views

Why don't changes in the bashrc file work on a new terminal window?

I'm trying to add an alias to the bashrc file. Since I'm not good at this, Im' going to write all the steps I took nano ~/.bashrc The file had this in it export PATH="$PATH:$HOME/.rvm/bin" # Add ...
1
vote
4answers
234 views

How can I list the partition table of an unmounted disk image?

I want to prepare Raspian Jessie found here in SD card for Biosignal Pi, instructions found here, but I have only OS X 10.11.3 El Capitan of Macbook Air 2013-mid now. The image is in fstype format so ...
2
votes
1answer
65 views

How to have GNU's date in OS X?

I do brew search date unsuccessfully. I have coreutils in my system. I could not find GNU date anywhere. How can you have GNU date in OS X?
0
votes
1answer
24 views

How best should I delete this user

I'm new to OSX and tried to create a user from the terminal which I no longer need and which I named incorrectly. I see I can delete the user in System Preferences > Users & Groups but do I need ...
0
votes
1answer
40 views

Mac Terminal app - unable to use the up arrow to load previous commands when using SSH on remote server ( ^[[A )

I'm running into a weird issue where the UP arrow no longer restores commands previously entered on a remote server during SSH session: :~ user$ ssh user@myserver //... type the password, get welcome ...
0
votes
1answer
56 views

What is difference “defaults read” and “defaults export”?

Helloo, I'm using OS X El Capitan 10.11.3 I'm trying to change Sidebar on Finder. I have got difference results with "defaults read" and "defaults export" Example: 1. defaults read command ...
1
vote
0answers
262 views

OS X El Capitan bash shell not working in Terminal

I have a weird issue with my bash shell in OS X El Capitan. I was messing around with my .bashrc file today, and now when I open my terminal I see nothing out of the ordinary (no messages, just the ...
0
votes
1answer
124 views

How do you do command-line video screen capture on OS X with libav?

On linux I can do something like: avconv -f alsa -i pulse -f x11grab -r 25 -s 1400x1050 \ -i :0.0+0,0 -vcodec libx264 -threads 4 \ -acodec libmp3lame video.mkv but of course the alsa and x11 ...
0
votes
2answers
47 views

Need a cli to check the sha256 hash of a file

To check the sha1 of a file I would use openssl sha1 <file> I'm not sure what to use to check the sha256 hash of the file however, what would you recommend?
3
votes
1answer
134 views

Why does JDownloader use 9666/tcp on localhost?

I found 9666/tcp to listen on 127.0.0.1 on OS X. I use version 15.3.0 > nmap -sT 127.0.0.1 ...
0
votes
0answers
18 views

How to generate pdf with MS WORD 2011 from Command line?

Is there a way to call MS Word 2011 from the command line to generate pdf from DOCX or PPTX?
0
votes
1answer
117 views

How to execute veracrypt on the command line?

How can execute veracrypt on the command line in OS X? According to the Veracrypt documentation there should be a command veracrypt but it was not found. Any advice ?
40
votes
5answers
126k views

How can I list all user accounts in the terminal?

How can I list all local user accounts (whether logged in or NOT so 'users' or 'who' is no good) in the terminal on a mac? OS X version is 10.6.8. I have seen this suggested - dscacheutil -q group ...
1
vote
1answer
18 views

homebrew: how to tell if a formula is binary

How do I tell if a particular formula will be installed as binary of from source? Is there a brew command for this?
1
vote
1answer
40 views

How can I combine multiple PDFs using the command line?

Is there a quick one-liner to combine multiple pdfs into one? I know it can be done using Preview.app
6
votes
5answers
18k views

How to add MySQL to $PATH variable to resolve “mysql: command not found”?

I installed MySQL on my Mac, and now I would like to add it to my $PATH variable. I want to be able to type mysql anywhere. I tried adding the following to my .profile file: export PATH=${PATH}/usr/...
1
vote
2answers
225 views

How can I open a specific port on OS X 10.11.13

I am currently working with msfvenom on OS X. But I wanted to know, the terminal commands to open a specific port say for example 4444. Can someone please help me out with this?
0
votes
0answers
24 views

Sudo command not working [duplicate]

I'm trying to install Soundflower and it failed. So the developer has instructions to manually install it which involves the sudo command. But my sudo doesn't work. It gives me sudo: /etc/sudoers ...
0
votes
1answer
334 views

screencapture -l not working: illegal option

I've wrongly opened the same question on StackOverflow. I hope to find a better explaination here. I've seen in many pages (for example here: How do I find the windowid to pass to screencapture -l?) ...
6
votes
3answers
8k views

Command Line Tools fail to install OS X Lion 10.7.3 Xcode 4.3

I'm trying to install the command line tools to get gcc, make, and other goodies after a Lion upgrade. I went to Preferences → Downloads in Xcode and attempted to install the command line tools. At ...
1
vote
1answer
562 views

Efibootmgr command for OS X

I have successfully been able to install Linux Mint on my Mac. The only issue is I cannot select the boot partition holding option. To fix it I booted into linux and ran sudo efibootmgr -o 1,80. This ...
1
vote
1answer
227 views

Boot problem on dual-boot MacBook Pro

Can anyone help me restore the original boot 'order' on my Mac, using command-line? I wanted to install Ubuntu on my Macbook Pro Retina (early 2013), so I could run some specific software I needed ...
1
vote
1answer
74 views

Run a command on a schedule and verify that it has run

I want to run an rsync command each day or more often to back up a raspbery pi on my network to a drive attached to my mac. I see launchd, but I'm very confused about how to get it to work, and I ...
11
votes
2answers
2k views

Is there a OS X equivalent for iproute2?

I am searching a command line tool collection like iproute2 on Linux. Network Utility is OK, but I would like it on the command line.
0
votes
0answers
16 views

“Display Notification” stuck in loop in Bash script

Is there any way I can fire a banner notification once through a bash script? I'm trying to modify this BitBar plugin to be a little fancier: #!/bin/sh # <bitbar.title>Gmail Checker</bitbar....
6
votes
2answers
2k views

Is it possible to download Apple's Command Line Tools for Xcode from the command line?

Background My job gives me temporary MacBook Pros for travel purposes. I get them with a fresh OS install before I leave, and when I return, they blank the hard drive. The trips usually require some ...
1
vote
1answer
40 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 ...
9
votes
6answers
5k views

How to prevent Mac sleep from command line?

I have a long running script at the remote computer. I don't want terminate my ssh session, and need enter it into a shell script. How is it possible to prevent my Mac from falling into sleep from ...
16
votes
3answers
5k views

How to update App Store application from command line?

I would like to force an update of App Store applications from the command line. How can I do this?
23
votes
4answers
7k views

Can Mac App Store installs & upgrades be automated?

How can I script installing or upgrading apps from the Mac App Store? I'd prefer command line tools, but AppleScript or some other API would suffice. Relevant puzzle pieces: installer: note ...
5
votes
2answers
19k views

Is it possible to view passwords through Terminal?

Does anyone know how to view passwords in Terminal? Maybe by accessing the Keychain data or something? I want to be able to view passwords in Terminal with just a series of commands.