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

Run a command on a schedule and verify that it has run

I want to run an rsync command each day or more often to back up a raspbery pi on my network to a drive attached to my mac. I see launchd, but I'm very confused about how to get it to work, and I ...
1
vote
0answers
36 views

Error when using “pmset sleepnow”

Whenever I use pmset sleepnow in Terminal (even with sudo) I get this error: Unable to sleep system: error 0xe00002e2. I have no idea what's going on. Please help!
10
votes
2answers
2k views

Is there a OS X equivalent for iproute2?

I am searching a command line tool collection like iproute2 on Linux. Network Utility is OK, but I would like it on the command line.
124
votes
5answers
64k views

git auto-complete for *branches* at the command line?

On my linux machine I have autocomplete for branches with git. [Note we are talking about git branch completion, not bash completion (e.g. commands, files, etc). Thus NOT lane's answer at all] For ...
49
votes
9answers
16k views

How do I speed up new Terminal tab loading time?

How can i speed up the terminal startup in Lion? I'm not referring to the startup of the Terminal application, but to the startup terminal windows, like when i open a new tab. I don't have anything ...
0
votes
0answers
12 views

“Display Notification” stuck in loop in Bash script

Is there any way I can fire a banner notification once through a bash script? I'm trying to modify this BitBar plugin to be a little fancier: #!/bin/sh # <bitbar.title>Gmail ...
6
votes
2answers
2k views

Is it possible to download Apple's Command Line Tools for Xcode from the command line?

Background My job gives me temporary MacBook Pros for travel purposes. I get them with a fresh OS install before I leave, and when I return, they blank the hard drive. The trips usually require some ...
35
votes
7answers
14k views

How can I change a file or folder icon using the Terminal

How can I change or set the icon for a file or folder, in the terminal, do I need to use a scripting language?
1
vote
1answer
38 views

Remove characters preceding the second underscore in file names

I have a bunch of files and I would like to remove all characters preceding the second underscore in the file names. An example is shown below. How do I do this using bash commands? [From] ...
1
vote
0answers
16 views

Applescript claims to run shell script, but script has no effect [duplicate]

So I have a bash script like this: #!/bin/sh FILE='some_file.js' gsed -i -E 's/something/somethingelse/' "$FILE" echo "Modified File" When I run this from command line, it echoes the last line, so ...
9
votes
6answers
5k views

How to prevent Mac sleep from command line?

I have a long running script at the remote computer. I don't want terminate my ssh session, and need enter it into a shell script. How is it possible to prevent my Mac from falling into sleep from ...
16
votes
3answers
4k views

How to update App Store application from command line?

I would like to force an update of App Store applications from the command line. How can I do this?
23
votes
4answers
7k views

Can Mac App Store installs & upgrades be automated?

How can I script installing or upgrading apps from the Mac App Store? I'd prefer command line tools, but AppleScript or some other API would suffice. Relevant puzzle pieces: installer: note ...
5
votes
2answers
18k views

Is it possible to view passwords through Terminal?

Does anyone know how to view passwords in Terminal? Maybe by accessing the Keychain data or something? I want to be able to view passwords in Terminal with just a series of commands.
3
votes
1answer
37 views

Recognise command and colour it on the terminal?

I was wondering if it's possible to colour a recognised command in real time while typing and/or when switching to previous commands using the arrows. For example, if I start typing gre, it should ...
0
votes
1answer
77 views

Find all hidden files that were hidden using the command “chflags hidden filename”?

I remember to hide an important file, but I can't find it anymore and I don't remember the name. I don't remember how I hid it, i.e., if just by inserting a prefix of . or using chflags hidden ...
14
votes
2answers
11k views

Is it possible to run Nautilus on OS X?

Is it possible to run Nautilus instead of Finder on Mac OS X Snow Leopard? How?
1
vote
1answer
44 views

Control haptic engine and force touch from terminal

Is there any way that I can create haptic feedback with the integrated force touch trackpad on my rMBP using a terminal command (preferably without AppleScript, but if that's the only way, then ...
1
vote
2answers
105 views

set PATH in terminal OS X 10.11.3

I need to set path /usr/local/gnupg-2.1/bin to the command line. I tried to enter "export PATH=/usr/local/gnupg-2.1/bin:$PATH" in the command line, but it works until the terminal session ends. I ...
1
vote
0answers
37 views

`scutil --nc start` not connecting PPPT VPN - OS X 10.11

From the answer to this question I have tried scutil --nc start 'us.justfreevpn.com' to connect a PPPT VPN, but all I get is the following popup: Frustratingly, if I manually start the connection ...
0
votes
0answers
47 views

Set Static IP address of local Interfaces in Mac OS X with Unix Script

I need little help regarding the setting of the static IPs and net masks of the various interfaces. I have a Mac client which has two physical interfaces. One interface is used for the "house ...
0
votes
2answers
39 views

Launch command using app

Could someone please tell me how to insert a terminal command into an "application" so when the app is clicked/opened the command is launched?
0
votes
2answers
56 views

How do I run a terminal command for different values

How do I have to label i such that the do command is repeated for all values of i. E.g. if i =2: cd /Users/xxx/zTree; wine explorer /desktop=1,640x480 zleaf.exe /language english /name lab1 cd ...
0
votes
1answer
45 views

How to grep with filename highlighted in one color, and the match highlighted in another color?

On the Mac, I can't seem to use grep and have the filename highlighted (or in) a certain color, and have the matching string in a different color. Is there an easy way?
46
votes
5answers
88k views

Can I get the CPU temperature and fan speed from the command line in OS X?

Is there a command I can run from the command line in OS X to get the current CPU temperature and/or the fan speed(s)? To be more specific, I'd like to be able to get the same info available in the ...
1
vote
1answer
55 views

What is the crlcache keychain and why do I have so many of them?

I run the keychain command-line app that allows me to fast-sleep my Mac or quickly lock a keychain. However, it seems to think that I have many crlcache keychains: When I search for crlcache on my ...
19
votes
1answer
3k views

Is there console mode in Mac OS X?

Is there something like Linux console in Mac OS X? Like "terminal", but without running graphics environment.
2
votes
1answer
71 views

Console Mode from Desktop

With most linux distros you can hit control + alt + F1 or the like, and get a Console. This is really useful when your X11 / display manager freezes, because you can restart that process / service in ...
4
votes
1answer
696 views

>console does not work

I have enabled the login window so that the username and password must be entered to login to an account. However, when I switch out of my user and type >console into the username field, the screen ...
1
vote
3answers
67 views

Copy specific files and keep the subfolder structure

I got a folder with a large amount of files with different suffixes in several sub folders. My automator workflow works as follows: Ask for Finder Items Get Folder Contents (sub folder option ...
0
votes
1answer
281 views

Is El Capitan preventing me from getting the Perl module DBD::Oracle working?

Let me start by saying I'm not traditionally a Mac user. I'm still trying to transition from Gentoo, where compiling everything from source was the default state, and the system wasn't actively ...
0
votes
1answer
27 views

How do I revert the sudo less /private/etc/cups/printers.conf command?

I have used the above command to try and find my printer's address using the web. Now I would like to revert this setting using terminal. Can anyone help me with this? Thanks in advance!
4
votes
4answers
11k views

How to find all files that are larger than 1GB on the Mac HD?

It seems that either one of these commands can be used: sudo find / -size +1G sudo find / -type f -size +1G But when it gets to /Volumes, it actually look at all the back up files by Time Machine ...
1
vote
1answer
52 views

How to install Monkeysphere on OSX El Capitan

I tried to install Monkeysphere via Homebrew but it complains of an unmet dependency. monkeysphere: Unsatisfied dependency: Crypt::OpenSSL::Bignum Homebrew does not provide Perl dependencies; install ...
1
vote
1answer
133 views
11
votes
1answer
730 views

OS X terminal “open” command and keeping focus on the command line

I appreciate the "open" terminal command to launch OS X apps. When invoking the open command for any purpose, it is overwhelmingly likely that I will have at least one other command I would like to ...
0
votes
0answers
36 views

grep doesn't work on big files on OS X 10.10

grep works on OS X 10.6, detecting string in a big binary file. It still works on OS X 10.10 on a small file. On OS X 10.10: $ grep -bao string small_file offset : string ... $ grep -c string ...
1
vote
1answer
85 views

Install automator service via command line

I would like to automate my Mac installation flow for services. The following is my script: #!/bin/sh rm -rf ./tempWorkflows mkdir tempWorkflows for filename in ./*.workflow; do cp -R "$filename" ...
2
votes
4answers
44k views

How to send text with telnet in Terminal?

I would like to send some text to a port on my machine using telnet in the Mac OS X Terminal. I start telnet using: telnet localhost 8080 Then I type some text. Is that text send automatically or ...
3
votes
1answer
271 views

Can I view history of recently connected USB devices in OS X?

Is it possible via the Terminal in OS X to show a history of recently connected USB devices. For example I want to know the specified ID of the MP3 Sony Walkman which I plugged into my MacBook Pro two ...
1
vote
1answer
31 views

How to change icon of an app through Terminal

I want to customize my app icons, but there's a lot of them, and I don't want to be tedious and go through the whole Get Info process over and over again. Is there any way to write a program, ...
0
votes
1answer
30 views

Detect Terminal Color “Theme” from Command Line

When one uses the terminal inspector, one can change many properties of the terminal, such as background color, text color, and selection color. How can I detect what these properties have been set ...
1
vote
3answers
44 views

Missing bash prompt

My bash prompt is missing as shown on the image. I'm not even sure how to open the .bash_profile since dot files are hidden in the finder. I restarted the machine to no avail.
0
votes
2answers
39 views

Are there replacements for the reg commad on Mac OS X 10.9

I believe reg existed on 10.8 and lower as documented here - https://developer.apple.com/library/prerelease/mac/documentation/Darwin/Reference/ManPages/man1/reg.1.html However, in OS X 10.9 I only ...
0
votes
1answer
38 views

Unable to install with admin

I am trying to update MAMP MySQL from this link, but when i double click the file as mentioned in the blog. I get message saying, The file “Install_MySQL_5.6.25.command” could not be executed ...
-1
votes
1answer
83 views

Is there any way to view iOS device logs on the Terminal?

Is there any way to view iOS device logs on the Terminal? Do the logs get stored in any file?
3
votes
2answers
337 views

Easy way to execute shell script

I want to be able to search in Spotlight for a shell script (or something that calls a shell script) and that such shell script opens a Terminal window so the output is shown live (and I can interrupt ...
0
votes
2answers
761 views

How do I use llvm-profdata in Mac OS X Yosemite?

I have a simple question: how do I use the llvm-profdata binary provided by XCode's Command Line Tools in the terminal? I have installed the Command Line Tools and could see the binary in ...
1
vote
1answer
43 views

unable to install homebrew

unable to install homebrew I am using this command. ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" getting this error. i have already installed updated ...
0
votes
2answers
97 views

terminal: how do i pipe the results of grep to open a file

I'd like to grep and open a file in just one terminal command. Suppose I'm in this directory: $ ls 1.txt 2.txt 3.txt 4.txt 5.txt and I want to open 3.txt I thought I could do ls | grep 3 ...