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
20 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 ...
2
votes
1answer
78 views

How to set up wireless bridge on same subnet?

I have set up Internet Sharing over Wifi on an ethernet-wired desktop Mac running Yosemite 10.10. I have various OS X and iOS clients that are able to connect to the shared Wifi connection and access ...
1
vote
1answer
50 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 ...
0
votes
1answer
28 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
0answers
62 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: ...
100
votes
9answers
77k views

What is the difference between iTerm2 and Terminal?

I keep hearing that iTerm2 is much better than Terminal. I downloaded iTerm2 today and played around with it, but I couldn't see what is so much better about iTerm2. iTerm2 seemed just like Terminal. ...
4
votes
4answers
3k views

Can I list files ordered by date added to a folder from a command-line tool like ls?

I need to build a script that shows files in the same order as the default Downloads folder in the dock, ordered by Date Added, newest first. I can't seem to find the option in ls. Any other way to ...
2
votes
2answers
2k views

“xcode-select --install” versus retrieving the dmg from Apple's developer website

I would to ask a question closely related to already existing posts (How to install command line tools without error that is not currently available on Software Update server? and ...
4
votes
4answers
6k views

How to open a new Terminal tab in current working directory?

I want to create and run a bash function that: cd into a project's directory Open a new tab in Terminal in the same directory Open my dev tools and start dev services Item #2 doesn't work as ...
1
vote
0answers
17 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
25 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 ...
0
votes
1answer
32 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: ...
0
votes
0answers
30 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() ...
9
votes
3answers
2k views

How to isolate processes that evoke insane mds_stores disk read activity?

I have an interesting situation where when I monitor my disk activity, I find that mds_store is continually running between 1 to 35 megabytes per second (averaging around 3-5 MB/s) on the read and ...
1
vote
3answers
75 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
1answer
27 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 ...
0
votes
3answers
61 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
18 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 ...
8
votes
1answer
296 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 ...
39
votes
2answers
68k views

Why doesn't Mac OS X source ~/.bashrc? [duplicate]

I found a lot of people figuring out why instruction similar to this : Put X to your ~/.bashrc and you can do Y don't work. It always turns out that Mac OS X's bash's startup files (or Mac's ...
4
votes
6answers
5k views

Monitor a folder for changes, and run a command when a change is detected

Is there a simple way to automatically run a (Terminal) command every time a file is changed in a specific folder? This should be possible via the command line, or a system built-in application, no ...
0
votes
1answer
33 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
1answer
21 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 ...
6
votes
1answer
120 views

How do I use non-“legacy” launchctl commands to load and unload plists?

I have some plist files in ~/Library/LaunchAgents. I have been happily using launchctl load -w and launchctl unload -w to turn these on and off for years. However, I notice that now load and unload ...
33
votes
13answers
77k views

Password dialog appears when SSH private key permissions are set to 0600

I installed my SSH private key in ~/.ssh/id_rsa and set its permissions to 0600. When I connect to an SSH server which uses my private key in Terminal.app via ssh, a dialog pops up and asks me to ...
0
votes
0answers
22 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 ...
1
vote
2answers
172 views

Exiting/Starting the Terminal (El Capitan)

In the latest Mac OS X Terminal version I noticed that if I type exit and the press Enter, I get the following: Last login: Wed Jan 27 09:18:48 on ttys000 Ian-iMac:~ Ian$ exit logout Saving ...
1
vote
2answers
3k views

Disabling the trackpad from the command line

How can I disable the trackpad (without restarting my computer) from the command-line on OS X Mavericks?
0
votes
0answers
25 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
0answers
31 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
25 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
0answers
22 views

How to open current folder in ForkLift from command line?

I know how to open it in Finder: open . But, how can I open it in ForkLift?
0
votes
1answer
13 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 ...
1
vote
1answer
68 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
24 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
48 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
14 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
54 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
37 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
37 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
84 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
41 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
31 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
26 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
25 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 ...
4
votes
2answers
1k views

Using the -Bless Command on Multiboot Macs with 10.11 El Capitan

As part of our standard deployment, we tend to deploy multiple OSs on Macs, from 10.7 to 10.11. However, with the new SIP (System Integrity Protection), the -bless command no longer works properly. I ...
1
vote
1answer
76 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
19 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 ...