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

Command-line tool to ask remote server for current date-time

On Mac OS X (such as 10.8 thru 10.11) is there a bundled command-line tool to ask a specific remote NTP time server for the current date-time? I found ntpdc but this queries the ntpd utility which I ...
0
votes
0answers
7 views

Is there a way to send the contents of a makdown file as the body of an email from terminal

I want to be able to white content in a makdown file and then send its (html converted) content to my own gmail. I have tried using the mail and mailx from the command line but whilst both of them ...
-1
votes
1answer
39 views

Which short command to only output the IPv4 routing table?

$ netstat -nr is great for outputting the Mac OS X IP routing tables. However its output is long as it contains both IPv4 and IP6 routing tables. Sometimes I wish to output only the IPv4 routing ...
0
votes
2answers
81 views

Recursively remove all invalid characters from text files in place

I have several thousand text files, some of which contain invalid UTF-8 characters. I want to recursively remove all invalid characters from these files in place. I am aware that many similar ...
1
vote
2answers
31 views

Which command to only output the IPv6 routing table?

$ netstat -nr is great for outputting the Mac OS X IP routing tables. However its output is long as it contains both IPv4 and IP6 routing tables. Sometimes I wish to output only the IPv6 routing ...
0
votes
2answers
81 views

How to send an email to myself with Applescript or Terminal automatically when my Mac reboots?

I wonder if there is a way to send an email to myself with Command Line or AppleScript service automatically when my Mac reboots? Thanks for your suggestions.
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
vote
2answers
49 views

Why doesn't pbpaste return cursor at new line in bash?

I run the command pbpaste in Terminal (bash) to get the result of my clipboard, but unlike other commands which leave the cursor at a new line below the previous stdout, pbpaste leaves it to the right ...
4
votes
2answers
109 views

How can i track progress of dd

I am using the following command to create a bootable SD Card sudo dd bs=4m if=en_windows_10_enterprise_version_1511_x64_dvd_7224901.iso of=/dev/disk2 Is there a way to track the progress?
0
votes
0answers
417 views

Crontab task “LSOpenURLsWithRole() failed … with error -600 for the file …”

I just moved to a new MacBook with El Capitan and trying to set up my crontab to do backup tasks. Here is how I have it set up (via crontab -e) 40 7 * * * /Users/myusername/daily.sh "daily tasks run ...
1
vote
1answer
38 views

Local Forwarding does not work

I have tried to forward local ports over SSH to a remote host: $ cat .ssh/config host km4ayu.com LocalForward 29070 127.0.0.1:29070 I've tried a bunch of things, but how do I make this forwarding ...
0
votes
1answer
101 views

Is there a `watch` command native to Darwin/OS X?

I have a script that I'm trying to port from Linux to Darwin/OS X. The Linux version currently depends on the watch command, which doesn't appear to be installed on Darwin/OS X by default. What's the ...
0
votes
2answers
41 views

Macports force-activate all ports

When trying to install SciTE sudo port install scite port stops at Error: org.macports.activate for port gettext returned: Image error: /opt/local/bin/autopoint already exists and does not ...
1
vote
1answer
144 views

Trouble running MySQL on OS X 10.9.5

So I ran over a lot of post treating of this specific problem but none of the answer seems to work for my case. So this is the process : I installed mysql via homebrew that lead me to this : ...
0
votes
0answers
31 views

pagestuff command error: Can't map file

I want to use pagestuff command line tool with my iphone application. It's working with Mac application but not with iphone application. used command pagestuff MetalMatrixMultiply.app -a Got ...
0
votes
0answers
13 views

How can I control Bluetooth using the CLI?

I would like to know how I could control the Bluetooth chip using the terminal. Is there any way to have equivalent commands as the one present on Linux? (Through XCode?)
0
votes
2answers
53 views

What happens if you used “rm -rf *” in /Users or /Users/someUser?

Note: Don't type rm or any variation of it into terminal under any circumstances if you are not experienced with the command line Does the Mac OS X block you from using rm in those directories to ...
2
votes
0answers
13 views

Get current time with/in milliseconds from OS X command line [duplicate]

I'm trying to get the current time from OS X command line to work with in AppleScript to output the elapsed time. Currently I'm using this script: set timea to do shell script "date +%s" ##something ...
1
vote
1answer
175 views

Mac OS X Terminal creates zero byte files

I'm a font developer. I want to merge a DSIG code into a TrueType format (TTF) font, which makes it compatible with Microsofts applications that use OpenType features. I have had this working before ...
23
votes
5answers
85k views

Why does OS X Mavericks block the purge command in Terminal?

When I try the purge command on my terminal, OS X Mavericks gives me the following message: Unable to purge disk buffers: Operation not permitted This hasn't been the default behavior until now. I ...
17
votes
3answers
14k views

Can I install or update Mac App Store apps through a command line using terminal? [duplicate]

Is there an official way provided by Apple or a workaround so that I can install or update Mac App Store apps through Terminal?
0
votes
2answers
78 views

How to type in Mac window?

I want to enter a simple adb shell command, so I navigated to ...\sdk\platform-tools\adb.exe, and opened it. However, I am unable to type in it! I am a new Mac user after recently moving from ...
1
vote
0answers
18 views

Can I list all programs that depend on a given framework?

I'm curious about what all on a stock OSX install uses the WebKit framework, since I keep seeing it pop up in crashlogs and it's supposedly a handy rendering swiss-army knife. What's a good way to ...
0
votes
1answer
2k views

How to batch download all files in a Volafile.io room?

Volafile.io Live Filesharing & Chat Example URL: https://volafile.io/r/$ID. There is Feature request: Download all the content of a room in a .zip file. #117. I don't wish to depend on that ...
0
votes
0answers
99 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
18 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
32 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
122 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
9 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
97 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
119 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
67 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
207 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
40 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
145 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
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 ...
1
vote
0answers
15 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
30 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
52 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
70 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
259 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
74 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
51 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
63 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
280 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
159 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 ...