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
37 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
109 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
25 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
321 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 ...
45
votes
2answers
74k 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
90 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: /...
7
votes
1answer
147 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 ...
1
vote
0answers
34 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
386 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 session......
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
27 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
42 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
33 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
23 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
94 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
35 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
64 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
23 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
68 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
45 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
45 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
101 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
232 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
37 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
61 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
38 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
128 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
27 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
12 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
46 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
12 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
153 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 ...
22
votes
5answers
84k 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
13k 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
71 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
1k 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
63 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
119 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?
32
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
94 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
109 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
61 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 ...