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

Terminal not responding to “which”, “type”, etc. commands

I tried to look for the full path of the TextEdit app in the terminal using the command which and whereis but the terminal doesn't respond. it just skips to the next line like there was no command: ...
-1
votes
0answers
44 views

Terminal Command to Edit Hostname [duplicate]

How can I edit the Hostname of my MacBook Pro via the CLI? Currently running Mac OS X Yosemite (Version 10.10.5).
0
votes
2answers
176 views

telnet shell-script in Automator

I'm partly new to Automator and since there is no application for Mac to control my Pioneer AVR I use some commands in the Terminal. But I'd like to automate some of my commands with the terminal. I ...
0
votes
1answer
66 views

npm commain in Automator

Hi, I would like to write an automator workflow which allows me to install node packages. I tried with $ npm insall but doesn't work any idea how I could solve this?
0
votes
2answers
59 views

Installing *.dmg via CLI [duplicate]

How are *.dmg packages installed via the command line? I noticed that they can be mounted with: me@MacBook-Pro:~$ open /Users/me/Downloads/installer.dmg What's next?
1
vote
2answers
46 views

generic approach to finding the correct name to run an app from the command line

Whenever I am not in a browser or in my text editor, most of my time on my mac is spent on the terminal. What's a quick, generic way to figure out how to run a gui program from the bash shell? It ...
0
votes
0answers
181 views

OSX Open Atom from terminal

I am trying to implement my own dotfiles. I am using zsh as my default shell. When I try to launch Atom from terminal I get this error FSPathMakeRef(/Users/agusgambina/Applications/Atom.app) ...
0
votes
0answers
15 views

control ios gestures on jailbroken iPhone via shell

Im looking for a way to do a simple scroll on an ios device via ssh or if theres a tool currently available that would work too. All i need is a way do do a scroll from the top of the screen to the ...
0
votes
0answers
25 views

Have URL scheme handled by shell (or other) script

I want to create a custom URL scheme, say x-camptown-races-sing-this-song-doo-dah-doo-dah, such that when I open a URL such as x-camptown-races-sing-this-song-doo-dah-doo-dah:foobar, it gets handled ...
1
vote
1answer
25 views

zero pad numbers in `cal` (or `gcal`) output?

This seemed pretty easy, but I have not found a good way to do it. In Terminal, cal will give this output: September 2015 Su Mo Tu We Th Fr Sa 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 ...
4
votes
3answers
544 views

How to convert a DVD to ISO?

On Mac OSX 10.9, how do you convert a DVD into an ISO that I can use with players such as VLC. I wish to achieve this without buying a program. Steps I have tried: Downloading Mac app Burn. It ...
1
vote
0answers
63 views

Setting up command line email for Mac Yosemite

I am trying to setup my system to be able to send emails from command line. This link explains the steps, and I am able to send emails. However, I have one issue, the sender name is picking up the ...
0
votes
0answers
214 views

log in to iCloud via command line

I used to be able to Screen Share with 2 of my Mac minis in remote locations until I changed my Apple password. Now they are not showing up under Shared in Finder. I am still able to SSH into them. Is ...
3
votes
3answers
701 views

iTerm - going one word backwards and forwards

Would it be possible to configure iTerm 2 to go backwards and forwards one word through the curent text in the command line using a keyboard shortcut?
1
vote
0answers
170 views

defaults: command not found

i have two users on macbook pro (yosemite). one of them has access to the defaults binary in /usr/bin the other user gets command not found. looking up in /usr/bin --> no defaults. both accounts are ...
-1
votes
1answer
802 views

Essential Networking Commands [closed]

I'm used to working with Linux so I like being able to do as much as possible from the comfort of my Terminal.app bash shell. So.. What are the essential networking commands & utilities ...
0
votes
0answers
38 views

Xcode Zombies from the command line

I'm encountering EXC_BAD_ACCESS, and I'm not sure of the cause. I know that Xcode offers Zombies, but when I try instruments t="Zombies" my_program_name it doesn't seem to raise the appropriate ...
1
vote
1answer
1k views

Make `hostname -f` return fully qualified hostname

How can i make hostname (i.e. the unix commandline tool hostname, invoked in terminal) return a hostname including the domain information? At the moment, hostname, hostname -f and hostname -s return ...
1
vote
4answers
175 views

Quote a filename in a script passed to chmod?

I'm having trouble quoting a filename that's eventually passed to chmod. The script was originally written for SSH's StrictModes and authorized_keys, but I had to expand it due to a bad UMASK that ...
1
vote
1answer
107 views

No commands installed from pip work in Terminal

I've been learning python and tried to install pep8, restviewer and other command line apps but when i try to run them, it shows a command not found error. -bash: restview: command not found I've ...
0
votes
2answers
131 views

applescript will not stop running

I have an applescript that utilizes a named pipe and pipes data over to it. I have my script passing said data in a while loop, which is working, but I find that I am unable to stop the script ...
2
votes
1answer
273 views

How do I open a new Terminal window ssh'ed to another machine from the command line?

From the command line I'd like to open a new Terminal window that is already SSH'ing to a host. From the command line, I can open a new Terminal window very easily: open -a Terminal or open -a ...
1
vote
1answer
68 views

Recover Meteor JS MongoDB from Time Machine Backup

I have recently recovered my Mac with a Time Machine Backup from the beginning of August. Today I ran an existing Meteor JS project and saw that the MongoDB documents were pretty outdated (latest ...
1
vote
3answers
380 views

Is there a command similar to Linux's command-not-found?

Most Linux operating systems have a package like command-not-found (http://packages.ubuntu.com/utopic/command-not-found), which provides suggestions when a shell command was not found, e.g. because ...
10
votes
1answer
3k views

Ubuntu-like bash completion in Mac OS X?

I work in the terminal a fair bit, and one thing I really miss from the servers I usually work on is the comprehensive autocompletion bash provides on Ubuntu servers. Are there any readymade tools ...
8
votes
5answers
3k views

How to create an OSX Application to wrap a call to a shell script?

My goal is to include in a zip file what amounts to a shortcut, instead of telling my customer(s) to open up Terminal and run a shell script. My deployable essentially looks like this: $ unzip ...
3
votes
1answer
188 views

How to make “say” command speak AND output to the file at the same time

When using the say command I can give it an option -o (file name) for it to record to a file. However, that suppresses the audio output. Is there a way to make it do both in one command?
1
vote
1answer
32 views

“open” from the command line just hangs using iTerm2

The open -a <AppName.app> is not working on one of my Yosemite based macbooks. The other one - also with Yosemite - works fine. open -a TextEdit.app ~/out (just hangs ) I have also tried ...
2
votes
1answer
249 views

Finder gets confused after using the mv command in the Dropbox folders

I should mention I'm new to command lines. I want to rename files using the mv command in the Terminal. I type: mv oldFileName.pdf newFileName.pdf Afterwards, I use the ls command to check whether ...
9
votes
3answers
19k views

how to reinstall xcode command-line tools?

I had serious problems from two versions of Xcode on the same machine. I removed all Xcode app instances & many other non-System 'xcode'-related files, then reinstalled the app (4.6.2), fixing my ...
0
votes
0answers
440 views

What will “rm -rf /” actually do?

I know that this is a very dangerous command, but what does it actually do. In other words, to what extend does it delete the hard drive. Does it delete only the user data? Or does it delete root OS ...
2
votes
1answer
171 views

Terminal Command to display a single line from a text file in OS X

I want to display at a specific line, e.g. line 4, from a text file in Terminal (I need this for character counts, using wc). I'm sure this is a simple problem but read -e 1 filename doesn't do it. ...
0
votes
0answers
92 views

Automator shell script - change file extension

I currently have a task that is working. It takes whatever files are added to particular folder and compresses them via Handbrake to another folder: for f in "$@" do HandBrakeCLI --preset="iPhone &...
4
votes
3answers
1k views

Dia command line not working

I've got a problem with using Dia from the command line on OSX 10.7.4. I downloaded and installed the OS X dmg from http://dia-installer.de/download/macosx.html I've been using it to create graphics ...
1
vote
1answer
239 views

Can I install Compass in Yosemite WITHOUT installing Xcode or Command Line Developer Tools?

I'm trying to install several programming packages, but it turns out that I can't because I don't have Xcode or Command Line Developer Tools installed. Some (e.g. git) were easy to install anyway. ...
3
votes
1answer
198 views

What is the difference between shutdown command and doing shutdown from apple menu?

What is the difference between issuing command shutdown -h now in terminal and doing Shutdown from apple menu? Using command it's instantly power down the system. But via menu it takes around 30-40 ...
1
vote
1answer
38 views

Different values for du and du -h

On the command line, du seems to return twice the numeric value returned by du -h. Apparently, du -h resembles the actual file size, so what's the plain du value representing?
1
vote
2answers
139 views

How to use the flag -p of BSD split?

Manual -p pattern The file is split whenever an input line matches pattern, which is interpreted as an extended regular expression. The matching line will be the first ...
1
vote
2answers
2k views

How to keep original “date created” when copying via Terminal?

There are many questions online asking how to make the commands rsync and cp go about copying a file while keeping the "date created" attribute the same as the original instead of the time of copy. I ...
1
vote
2answers
589 views

Suspended (tty output) when launching editors like vim, vi, emacs, or nano

I've been using Oh-My-ZSH for a few weeks now and it's been a great experience. Just today, though, terminal started acting strangely. When I try to run an interactive terminal editor like vim, vi, ...
2
votes
1answer
909 views

How to disable Bluetooth Sharing via terminal?

I want to disable the Bluetooth Sharing that is located in the sharing preference section. I want to be able to disable it via terminal, does anyone have an idea on how to do that?
1
vote
2answers
501 views

Shell command to count pages in a PDF (other than pdftk)?

I have been using this to get a page count of PDFs in shell scripts in OS X: pdftk "$i" dump_data | grep NumberOfPages | awk '{print $2}' | tr -dc '[0-9]' (where $i is the PDF filename) However, ...
0
votes
0answers
151 views

GUI alternative to ImageMagick Montage (very simple collage)

For example Instagram's pictures are quite low resolution. I normally join a few pictures together with montage (installed with brew, from ImageMagick project). montage IMG_7771.JPG IMG_7772.JPG -...
0
votes
1answer
75 views

Applescript or Shell rename a file?

The following is the code I have, however, it doesn't let me choose the extension I want to save it as. How can I save the file as a ".plist" ? do shell script "echo '{ Filter = { Bundles = ( \"'" &...
10
votes
3answers
4k views

How to programatically add folder to Spotlight “do not index”?

Is there any way to programmatically add a folder to Spotlight's "Privacy" tab? Either through Terminal or Applescript? Often I want to click on an item in Spotlight results in Finder, and have that ...
11
votes
4answers
5k views

Why is extracting this tgz throwing an error on my Mac but not on Linux?

I'm experiencing a rather odd problem, and I can't figure out what's going on. I have a tgz file, scip-3.2.0.tgz, that is throwing an error when I attempt to unpack it. The error is only occurring on ...
1
vote
1answer
175 views

Shell script to rsync or if not mounted - mount and rsync

This is what I've got so far: !/bin/sh Storage Folder Backup Defines mount point LOCALMOUNTPOINT="/Volumes/thisisanetworkshare" Checks for mount if mount | grep "on $LOCALMOUNTPOINT" > /dev/...
2
votes
1answer
200 views

Shell Script Commands Work Fine in Terminal But Not Via AppleScript

I have two commands that I need to run through the Terminal. They are cd /Users/[my name]/Desktop and curl 'www.google.com'>google.txt. When running these directly in Terminal they work just fine. ...
0
votes
1answer
110 views

How do I 'pause' in a .command-script?

I want to create a .command-script on Mac, to execute a series of commands on a remote server using SSH. My script looks something like this: ssh user@domain.com cd /var/www/website/ git pull ...
25
votes
5answers
4k views

Did `man ls > temp.txt`. Output textfile is corrupted

When I execute man ls > temp.txt the output text file is corrupted. By corrupted I mean that first and last letters in some words are overly repeated. Several first lines in temp.txt: LS(1) ...