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
1answer
35 views

What automatic script runs with Bourne Shell (/bin/sh) for root?

I want to add some aliases to my OSX command line environment for easier navigation when in the root prompt (sudo su to root). On the Bourne Again Shell (/bin/bash), I can edit /var/root/.bash_profile....
0
votes
0answers
33 views

Can't delete keychain items with UI, but command line works fine

When using the Keychain Access app, I am often unable to delete an Web form password item. I have tried hitting the delete key and going to Edit > Delete. In both cases, nothing happens, there is no ...
-1
votes
1answer
60 views

Can naming/running a program “sudo” somehow cause problems?

I hope this is an appropriate place to post this--I have no idea what happened. I named a c++ file (a simple sudoku solver) "sudo.cpp" and then compiled it with "g++ sudo.cpp -o sudo" and ran "./sudo"...
0
votes
1answer
26 views

Does Apple provide a web site with content of `man` pages for the command-line commands bundled with Mac OS X?

I want to provide URL links to man page content at apple.com as an authoritative source of information. Describing and quoting the local man page is awkward. Does Apple provide man pages on the web?
1
vote
1answer
35 views

Carbon Copy Cloner shell script for ejecting the source drive

I created a backup system for a friend, using Carbon Copy Cloner. The system has been up and running since January, but it needs regular intervention. The main problem is that external hard drives ...
0
votes
1answer
35 views

Finding file in parent folder of an AppleScript

I have an AppleScript that calls another script (a perl script in this case) which resides in the same folder as the AppleScript. Now I'm trying to put the script into a variable like this: tell ...
1
vote
1answer
76 views

How can I find the serial number of my Apple Keyboard USB on a mac programmatically from the terminal?

I would like to retrieve the Apple USB Keyboard's serial number from a command to use in a script. What command can I use ?
3
votes
1answer
62 views

root user can't create a file in /usr/lib

I am trying to follow this advice from stackoverflow and copy some library files from /usr/local/Cellar/openssl/1.0.1c to /usr/lib/. I have tried cp, ln -s and even touch, but they all fail. I am ...
0
votes
1answer
45 views

Send notification from command line [duplicate]

On Mac OS X, some applications will display a notification that appears briefly in the upper-right corner (e.g., when I receive email). Is there a way to generate a notification from the command-line?...
1
vote
0answers
37 views

Are there any advantages to using GNU over the default OSX command line utilities? [closed]

Are there any advantages to using GNU utilities (installed via homebrew) as opposed to the default, BSD based OSX utilities? They seem very similar to me, but I will not pretend to be a master of ...
1
vote
1answer
42 views

Is there a terminal command to open applications in a specific Desktop?

For example when I run open -a Kodi I'd like to be able to specify which Desktop I'd want the application to launch in. Trying to avoid dragging/dropping to the desired workspace.
0
votes
1answer
25 views

To get Graphical Info reader in El Capitan?

Graphical info reader is the reader which colorises links in the info pages. I know there are good options in OS X but I cannot find them. I do home search info and I get homebrew/science/clinfo ...
7
votes
1answer
217 views

Why does OS X have bash v3.2.57?

OS X comes with bash version 3.2.57 instead of bash version 4.3.39, which GNU lists as the current stable release of bash. Is there any way to upgrade bash on Mac OS X?
1
vote
1answer
10 views

Transfer statistics per process or destination, not interface

I would like to log upload statistics for an application I run on my Mac. Now, I know that with netstat -ib I can access statistics per network interface. I also know that with lsof -i I can get a ...
0
votes
1answer
34 views

'cat' not displaying line breaks

For some reason cat no longer shows line breaks when I use it, while all other tools (grep, more etc) do. I am using iterm2 on OSX 10.11.4. What could be causing this behaviour? Example I have a ...
1
vote
1answer
51 views

Force enabling TRIM before setup assistant is run

Basically, I'm preparing to give a MacBook Pro, running Mac OS X 10.11.4, to someone, but I need to execute "sudo trimforce enable" beforehand, as it contains an aftermarket SSD (fully compatible with ...
3
votes
2answers
55 views

How to Change USB Thumb icon using Terminal or Bash/other scripting language

I'm looking for a method to change USB or External Drive Icon using bash or any other command line method. I know how to manually chnage them like this I am using El Capitan
0
votes
0answers
73 views

In Terminal, how do I run a curl command to POST data?

I'm using OS X Yosemite and having trouble running curl to POST data to my local server. Below is the command I'm running and the response: localhost:myproject davea$ curl --header "...
5
votes
3answers
531 views

setup youtube-dl destination to ~/Downloads

How do I setup youtube-dl to default download to ~/Downloads instead of the home folder?
1
vote
0answers
29 views

El Captan disk utility did not see erased partition after fail bootcamp install

I try to get my full drive after fail a bootcamp install of Win. Now I have removed extra partition from my fusion drive, but can’t see empty space using the el captan disk utility. Using shell, ...
1
vote
2answers
68 views

How to Install pdfimages in El Capitan?

I am reviewing the answer here about Extracting embedded images from a PDF. It is not in Homebrew. How can you install pdfimages in OS X El Capitan?
1
vote
1answer
19 views

Does Homebrew have a command-not-found hook?

Arch Linux's pkgfile has a command-not-found hook that you can source from your shell's startup file (.zshrc, .bashrc, or whatever). Does Homebrew have anything roughly equivalent to this?
0
votes
0answers
65 views

Get result of Terminal tab do script via commandline

I've seen similar questions like this but none seem to deal with getting the result from a specific Terminal tab? I'm writing a Chrome extension to do some awesome stuff. Right now I'm just trying to ...
0
votes
0answers
18 views

R installed through MacPorts won't install packages

On my system where I installed R through MacPorts, I get this error when I try to install a new R package: > install.packages("sas7bdat") Installing package into ‘/Users/simsong/Library/R/3.2/...
0
votes
1answer
66 views

Trying to compile thttpd 2.27 on Mac OS X 10.11

I'm trying to compile thttpd 2.27 on Mac OS X 10.11 from source, but when I issue: ./configure It shows: creating cache ./config.cache checking host system type... configure: error: can not guess ...
0
votes
1answer
175 views

Error while installing Homebrew on Mac OS X (10.10.3): Unable to change file mode on /usr/local/

When I run the command on the home brew website, /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" I get: ==> This script will install: /usr/...
1
vote
1answer
93 views

One line weather output from terminal

Anyone knows a way to get a one line weather output in the terminal window with specified location? So far I'm using curl wttr.in/city but I would like a one output like City, Sunny 0'. I've found ...
2
votes
1answer
26 views

Preferable way to ship a command line tool with my OS X *.app

I'm working on an Electron based application to write OS images to removable drives, which is being packaged as an *.app for OS X. Along with the GUI application, I'd like to ship a CLI version ...
0
votes
1answer
39 views

Deleting password from Keychain in terminal

I'm having trouble deleting the github credentials from Keychain Access. Keychain Access just freezes everytime I try. Is there a command to force deletion of an item in the Keychain from the terminal?...
0
votes
1answer
47 views

Mac OSX equal to linux time command

What's binary that will give exact result for Linux's time command flags? alias tcmd='/usr/bin/time \-f\ "CPU: %Us\tReal: %es\tRAM: %MKB"' Current time in Mac OSX for command above is: /usr/bin/...
0
votes
0answers
115 views

LSOpenURLsWithRole() failed with error -600 when opening html file from terminal

I created a new test.htm file in my homedir, and when I type open test.htm it switches to Firefox, just opens an empty tab (my file does not appear), and the terminal says: LSOpenURLsWithRole() ...
1
vote
1answer
44 views

Terminal - Weird spaces included when typing fast

Whenever I want to use the pipe operator in the terminal, I get a weird kind of "bug": As is shown in the image above, I can type the exact same command twice and it will sometimes register it or ...
1
vote
3answers
240 views

How to run a shell script from an AppleScript?

I am using a Mac running OSX Yosemite v.10.10.5. When I try to run my shell script from my AppleScript, I get the following error message: Error message at AppleScript Script Editor error "sh: /...
0
votes
3answers
187 views

How do I run a .sh or .command file in Terminal

I've always wanted to be able to run a script I've downloaded online directly from the Finder but just double clicking the file does not work.
0
votes
1answer
32 views

How to cd into my local git repo from an AppleScript?

I am running a Mac using OSX Yosemite v10.10.5. I want to push my local git repo to my remote using AppleScript. So the git code would be: shell git init git add README.md git commit -m "first ...
0
votes
1answer
161 views

curl not working in El Capitan

I receive this error message when trying to run curl from the terminal command line: /usr/local/bin/curl: line 61: /usr/local/bin/sed: No such file or directory /usr/local/bin/curl: line 65: /...
0
votes
2answers
43 views

Workflow/tools for installing command line application on OS X (Yosemite or later)

I maintain a set of command line bioinformatics tools which we distribute as source and binaries for Linux, Windows, and OS X. Currently the binary distribution for OS X is just a zip file containing ...
1
vote
0answers
44 views

Does rsync have issues with Unicode Characters in filenames?

I run rsync via a crontab every night to make an offsite backup of a directory's state, fairly trivial stuff really. While going through the logs, I noticed that in particular there were a set of ...
0
votes
0answers
29 views

Converting to .PDF and keeping original name — what am I doing wrong?

I have been piecing together what little I have learned of Automator along with pieces I've found in tutorials, but cannot seem to get this to work! If I test this as a workflow using a file from "Get ...
0
votes
0answers
17 views

Where I can find BSD watch for snooping on another tty line?

In FreeBSD there is watch command which allows snoop on another tty line. Since OS X is based on FreeBSD, where I can find that command? Or it was removed for some reason (or never included)? To ...
0
votes
1answer
383 views

lshw or lspci for Mac OS X

What's the closest alternative to something like lshw or lspci on Mac OS X? The closest thing I know of is system_profiler but it spits out way too much unnecessary information.
0
votes
0answers
62 views

How to make identical rsync copy that passes manual MD5 checksum?

OSX Yosemite 10.10.5 rsync version 3.1.2 md5sha1sum installed Items that I’m trying to copy and verify is 10+ GB folder containing 5000 files and 800 subfolders. No system files. Not sure if the ...
0
votes
1answer
25 views

How create an identical timestamp format as used in ppp.log file in a shell script?

In the need to add custom logging messages to ppp.log, I see that the date and time are missing when outputting the command to >> /var/log/ppp.log. Other pppd related messages in ppp.log are ...
0
votes
0answers
8 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 ...
1
vote
2answers
34 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 ...
8
votes
1answer
324 views

Unhide invisible files from the command line

By default, a number of system directories (such as ~/Library) are hidden in OS X (ie. they don't appear in Finder): I know I can do this through the GUI but I would like to add a script to my ...
1
vote
1answer
109 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
2answers
83 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
50 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 ...