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

date command gives no output

I made an alias earlier today that I saved in my .bash_profile. The alias was called date. I had momentarily forgotten that date is already a native command on OS X (and Linux) in /bin. I removed the ...
26
votes
5answers
7k views

Disable line wrapping for output in the Terminal

I often read outputs in the terminal that get wrapped as they are too long. Since there is no way that I can modify the printed output, I need to let the Terminal allow for horizontal scrolling. Is ...
3
votes
2answers
48 views

How can I get the dev name associated to a Volume name?

I am creating a bash script to unmount my usb drive after the backup is done. To unmount the drive I use the command: diskutil unmount disk4s1 But sometimes when I plug my usb drive it gets a ...
2
votes
2answers
24k views

MySQL not working on mountain lion

I'm using mountain lion, I have installed MySQL. GUI It shows MySQL is running, but when I type mysql --version It gives error "mysql: command not found"
0
votes
1answer
45 views

Use script without root

I write a maintenance script with different commands. the script has sudo commands inside. Now I want to use crontab, but my first problem is: How can I use the script on user level without root ...
11
votes
2answers
3k views

Shell Script for Yesterday's Date

I'm trying to execute the following shellscript with hazel app on any file in the folder. It works, but the only thing thats causing a problem is the date for yesterday. #! /bin/bash saveDir="TJ" ...
101
votes
5answers
184k views

Can I open files in TextEdit from the Terminal in Mac OS X?

I frequently find that a terminal command to open a file in TextEdit would be very handy. Does such a command exist on Mac OS X?
0
votes
0answers
17 views

alternative to Dterm for quick terminal

I love Dterm but it is no longer maintained. Is there an alternative? I also use Alfred's term launcher and iTerm but those are not as efficient for context sensitive one liners.
1
vote
1answer
27 views

OSX Unmount usb disk drive from Automator bash script

I have a task in automator to make my backup, it runs shell script code, lot of code is working well but the unmount command doesn't works, I don't get unmount the unit after backup. I checked to run ...
3
votes
4answers
3k views

How to remove or hide Apple applications from my app folder?

I've got a lot of Apple applications on my Macbook which I never use (Photos Facetime, iBooks, iMovie, iTunes, etc.). They just clutter up my application folder and I want to get rid of them. This ...
1
vote
1answer
16 views

Change libtool used in command line

I followed this post to install automake, autoconf and libtool. When I check automake and autoconf versions they look fine. However, when I check libtool's version I get the following $ libtool ...
2
votes
1answer
103 views

Changing iterm2 Terminal Color

Is there a way to bold the color of the current active terminal tab in iterm2? I do not see an option to do that on the appearance tab of preferences. I know I can change the tab style, but I still ...
0
votes
0answers
10 views

Help fix my xampp/mamp/mysql installation

I've installed xampp,mamp on my iMacbook air running OSx 10. At first they seem both running well, but several months later, there are a lot of problems going on and they seem interwined. I can't ...
22
votes
4answers
31k views

How to get the fully resolved path of a symbolic link in Terminal?

I have a tangled mess of python installations on my laptop. I was looking at the executables in /usr/local/bin and they are all symbolic links to ../../../Library...... There's some weird behavior ...
0
votes
0answers
14 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
44 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
31 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
970 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
25 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
62 views

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

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
17 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
43 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
47 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
28 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
30 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
28 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
75 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
23 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 ...
123
votes
4answers
180k 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
44k views
0
votes
1answer
27 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
41 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
22 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 ...
99
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 ...