questions narrowly about terminal.app alone should use this tag. Please consider using **command-line** for any question not specifically about the native terminal app

learn more… | top users | synonyms

0
votes
0answers
10 views

Certain Icons with a Specific Size on desktop

Is there a Terminal command or setting to edit the registry of a Mac to change the size of a specific icon on the desktop (not all) smaller or larger? This feature would help me organize my mac and ...
1
vote
0answers
26 views

Terminal command to clear DNS cache doesn't seem to work

I do a lot of website work where I change nameservers for a domain, wait overnight for it to propagate on the host server, then go back to work on the site. Lately, what happens is that I can see the ...
0
votes
0answers
17 views

How to factory reset a broken mail app via terminal OSX El Capitan?

I opened my mail app this noon I wanted to send an email, as usual I clicked on the compose email button I wrote my mail and sent it. Now after that the mail app started acting strange. It switches ...
5
votes
2answers
960 views

Script to change Computername/hostname causing bizarre Terminal behavior

I have a script (mostly borrowed) which utilizes scutil to rename computers based off of values in a CSV file. It matches the serial number to a computer name, sets a variable, and then renames the ...
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 ...
1
vote
2answers
20 views

change sudoers to stop asking for password when running a systemsetup comman

To what exactly do I need to change sudoers file to prevent asking for password when I change system time zone? This is the command I am going to run: sudo systemsetup -settimezone timezone I know ...
0
votes
1answer
47 views

I lost my bash commands (error command not found) [on hold]

I was trying to set up Python environment (virtualenv and virtualenvwrapper, following this tutorial - Install OpenCV 3.0 and Python 3.4+ on OSX) and that's where my problems started. The wrapper was ...
8
votes
3answers
11k views

How can I mount an encrypted disk from the command line?

When I type diskutil mount disk3 in the terminal, it says Volume(s) mounted successfully. However, the disk is not mounted and I can confirm this by opening the GUI of Disk Utility.app and also the ...
2
votes
1answer
16 views

How to export Moom settings (especially keyboard shortcuts) to external file?

I'm working on some shell scripts to customize OS X to my preferences just by calling one script. From a lot of native OS X options, script is going to easily import some predefined settings form 3rd ...
0
votes
1answer
41 views

Macbook Snow Leopard Unzipped file

I used Terminal command to unzip an audio file downloaded from a public library. Command used: unzip -v /<zip filename.zip>; rm -rf _MACOSX. Terminal displayed 31 files were extracted and ...
0
votes
3answers
44 views

locate isn't finding a file that exists

The file in question is: /Users/me/Library/Containers/com.dell.Toad/Data/workspace/.metadata/.plugins/com.dell.toadext.oracle.core/connections.xml What is wrong with locate?
34
votes
15answers
79k 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 ...
2
votes
2answers
60 views

Dragging and dropping a file onto a Terminal window doesn’t escape the path under zsh 5.2

Under OS X you can drag and drop a file from the Finder (or anywhere else) onto a Terminal window and the file’s path will be inserted as if you had typed it in. Recently, filenames with spaces have ...
33
votes
4answers
13k views

Text copied from Terminal with formatting in Mavericks (10.9), Yosemite (10.10), and El Capitan (10.11)

After the update to Mavericks (10.9), anything copied from Terminal is pasted in the target app with the same formatting as in Terminal, in my case, white monospaced letters on a black background, ...
0
votes
1answer
26 views

Help Understanding Terminal's Command

OS X 10.11.5 on a Mid 2011 iMac. I'm new to development on OS X and am trying to understand enough to figure out a Ruby path issue I'm having. I ran Inspector on Terminal and was surprised by the ...
1
vote
0answers
20 views

How to assign a different audio bell for terminal

I just dont like the system audio bell for the terminal in my mac. How can I get my mac use a different file which I have obtained from internet. Its a .wav file which I have got from the internet.
0
votes
0answers
28 views

Extract Icon of File using Terminal

I need a way to extract the icon image of a file or directory and save it as a PNG or JPG, using the CLI. For example, if the file were a PDF document, the extracted image would be of it's icon: the ...
0
votes
0answers
27 views

Why does my terminal in Macbook show this message? What should I do to preclude that message?

Last login: Mon May 23 11:29:54 on ttys000 -bash: /Users/karthy/Library/Enthought/Canopy_64bit/User/bin/activate: No such file or directory
0
votes
0answers
16 views

programatically mimic events on a Mac [duplicate]

How can I listen for an event on my Mac, record the event and than execute it programatically. For example, I want to reload extension I made programatically. For that I need to go to Extension ...
1
vote
2answers
73 views

After waking-up, how do you know if your mac was hibernating (fully powered off like Windows PC) and not sleeping?

Not sure if my Macbookpro Retina 2015 is waking up from sleep, safesleep or hibernation. I have enabled hibernatemode 25 (via terminal command: sudo pmset -a hibernatemode 25). pmset -g shows ...
0
votes
0answers
21 views

programatically reload Safari extension

How can I programatically reload extension I created in Safari? This image shows the reload button that I manually have to click every time I update my extension: Any way to this is ...
9
votes
6answers
18k views

How to rename multiple files at once?

I want to rename multiple files at once. For example: Picture1.jpg Picture2.jpg Picture3.jpg Picture4.jpg into Vacation-Picture1.jpg Vacation-Picture2.jpg Vacation-Picture3.jpg ...
3
votes
3answers
23k views

Error: “The operation can’t be completed because one or more required items can’t be found. (Error code -43)”

I accidentally pulled an NTFS hard drive out of my Mac OSX Mavericks machine several times and realized that I accidentally created multiple entries of many different names in my /Volumes/ folder. Now ...
122
votes
4answers
179k views

How can I create a symbolic link in Terminal?

What command is used to create a symbolic link/soft link?
6
votes
1answer
453 views

Can the default permissions on /dev/disk* be changed?

Is it possibile to change default permissions /dev/disk*? In Linux this is done in the udev configuration files; which is the equivalent on OS X? I'd like to give group write permissions so members ...
5
votes
5answers
43k views
0
votes
1answer
24 views

How to use GUI pinentry program for GPG

I would always like to use the GUI version of entering my GPG passphrase. Currently my pinentry program is set the same on my laptop as my desktop. But the desktop always asks for my passphrase on the ...
0
votes
0answers
24 views

How can I undo sysctl commands?

I was troubleshooting an issue connecting my PS4 to my MAC to share my VPN connection and I typed this into my terminal: sudo sysctl -w net.inet.ip.forwarding=1 sudo sysctl -w net.inet.ip.fw.enable=1 ...
0
votes
0answers
22 views

replace folder using Terminal

How can I replace a folder using Terminal? I tried this, but this code copies the folder, but it doesn't replace it when the folder is already present. Is manual deleting before copying the only way? ...
1
vote
1answer
35 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 ?
-1
votes
1answer
24 views

Downloading music

if I download music from a legitimate website, like amazon or iTunes, and half through my download I receive a Facebook notification or a text message or phone call on my phone, will the notification ...
2
votes
1answer
21 views

Automator task to open screenshots in Preview automatically

I'm pretty new to Automator but it seems like it's possible - I just can't seem to get it to work. I'd like to be able to take a screenshot and then open it up in Preview for easy annotation. If it's ...
2
votes
3answers
134 views

Set the result of command to variable in Terminal post execution

How can you set the output of a command run in terminal to a variable after it has run? Background (You can skip of you don't need the background) I run VirtualBox VM and do a lot from the command ...
3
votes
1answer
343 views

Switching spaces on one monitor affects open applications on other monitor; looking to prevent this - BOUNTY

Kind of hard to describe. Using Yosemite 10.10.3. Using a mac with two monitors. Left monitor has one desktop space. Right monitor has two desktop spaces. I use a lot of terminal windows at work ...
98
votes
18answers
110k views

Is there a Mac OS X Terminal version of the “free” command in Linux systems?

On Linux, I often use the free command to see the current amount of free and used memory in the system. For example: $ free total used free shared buffers cached ...
5
votes
4answers
2k views

Force Terminal to Use Gedit for any Text Editing - not vim

I'm learning to program. While following this mission, I typed git commit, which opened up vim. I don't know or want to know vim (no offense to vim lovers). I'd like to have: terminal open gedit ...
5
votes
3answers
845 views

How does the sudo key symbol work?

I'm trying to write a script that requests the user password for some sudo-related commands. My goal is to emulate the default method that OS X uses to obtain the user's password, Password: followed ...
1
vote
2answers
36 views

Why does 'set -x' cause the terminal to dump garbage

This problem is quite annoying and I cannot search Google for 'set -x' because the minus sign has another terminology there. In my MacBookPro, when I use 'set -x' to debug bash commands, I'm getting ...
0
votes
2answers
50 views

How to get defined lines from OS X Terminal result?

How do I get the first 20 lines of a OS X Terminal result?
4
votes
5answers
2k views

How to find the currently connected network service from the command line?

I would like to find out which of the available network services (e.g. Ethernet or Wi-Fi) is currently active. In this screenshot from the Network Preferences, you can see that Wi-Fi is currently ...
1
vote
0answers
32 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 ...
0
votes
0answers
9 views

Screen Sending EOL After Each Character

I just connected my Anthem AVM20 audio/video controller to my Mac Mini via an USB to RS232 cable. I've been able to bring up a screen session. The problem is that it appears to be sending some sort of ...
0
votes
0answers
26 views

How do I make terminal windows STAY the same size?

I have set up my terminals, so that they are the size I want them to be. However, I often have several tabs open in each window. Terminal keeps trying to make the window BIGGER when I get too many ...
0
votes
2answers
53 views

How to get file sizes of large files in OS X Terminal?

I'm trying to get the file size of a big file (1GB +) using the OS X Terminal. I'm using du -sh. But also after 30 seconds I don't have any result, is there any faster command? Thanks.
12
votes
2answers
15k views

Create a Terminal command to open file with Chrome

I want to create command in terminal that would allow me to use chrome index.html and have the the given file open in Google Chrome. How can I get this working?
0
votes
0answers
33 views

-p: command not found - Automator help needed

I'm using Automator to run a shell script for taking an interactive screencapture and opening it in Preview for easy annotation. When running the script it fails and states -: -p: command not found. ...
1
vote
1answer
24 views

Change iTerm2 profile depending on current directory

Using my .bash_profile, I used to change my iTerm2 profile per machine with the following command: echo -e "\033]50;SetProfile=ssh\a" Now, I want to change it depending on my current working ...
6
votes
5answers
3k views

El Capitan - Right Click Menu - Open Terminal Here

I know this may have been asked several times, however I cannot find a valid method that will work for me. On El Capitan - I want to add a option to the right click menu (not the services section) ...
0
votes
1answer
18 views

How to change the GNU Make's (default) default location of gcc

I run Mac OS X El Capitan 10.4. I have used brew to install Compilation Tools (https://www.topbug.net/blog/2013/04/14/install-and-use-gnu-command-line-tools-in-mac-os-x/). Now when I run make, it ...
1
vote
1answer
33 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.