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 (1)

1
vote
3answers
72 views

Quote a filename in a script passed to chmod?

I'm having trouble quoting a filename that's eventually passed to chmod. The script was originally written for SSH's StrictModes and authorized_keys, but I had to expand it due to a bad UMASK that ...
1
vote
1answer
26 views

No commands installed from pip work in Terminal

I've been learning python and tried to install pep8, restviewer and other command line apps but when i try to run them, it shows a command not found error. -bash: restview: command not found I've ...
3
votes
2answers
122 views

Starting and stopping mysql server. Shorten and make automatic

Currently I start and stop mysql with the following command sudo /usr/local/mysql/support-files/mysql.server start sudo /usr/local/mysql/support-files/mysql.server stop It is quite a long ...
2
votes
1answer
18 views

How do I open a new Terminal window ssh'ed to another machine from the command line?

From the command line I'd like to open a new Terminal window that is already SSH'ing to a host. From the command line, I can open a new Terminal window very easily: open -a Terminal or open -a ...
31
votes
9answers
10k 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 ...
1
vote
1answer
24 views

Recover Meteor JS MongoDB from Time Machine Backup

I have recently recovered my Mac with a Time Machine Backup from the beginning of August. Today I ran an existing Meteor JS project and saw that the MongoDB documents were pretty outdated (latest ...
1
vote
3answers
301 views

Is there a command similar to Linux's command-not-found?

Most Linux operating systems have a package like command-not-found (http://packages.ubuntu.com/utopic/command-not-found), which provides suggestions when a shell command was not found, e.g. because ...
9
votes
1answer
3k views

Ubuntu-like bash completion in Mac OS X?

I work in the terminal a fair bit, and one thing I really miss from the servers I usually work on is the comprehensive autocompletion bash provides on Ubuntu servers. Are there any readymade tools ...
0
votes
0answers
19 views

Efibootmgr command for OS X

I have successfully been able to install Linux Mint on my Mac. The only issue is I cannot select the boot partition holding option. To fix it I booted into linux and ran sudo efibootmgr -o 1,80. This ...
3
votes
1answer
55 views

How to make “say” command speak AND output to the file at the same time

When using the say command I can give it an option -o (file name) for it to record to a file. However, that suppresses the audio output. Is there a way to make it do both in one command?
0
votes
1answer
15 views

“open” from the command line just hangs using iTerm2

The open -a <AppName.app> is not working on one of my Yosemite based macbooks. The other one - also with Yosemite - works fine. open -a TextEdit.app ~/out (just hangs ) I have also tried ...
2
votes
1answer
152 views

Finder gets confused after using the mv command in the Dropbox folders

I should mention I'm new to command lines. I want to rename files using the mv command in the Terminal. I type: mv oldFileName.pdf newFileName.pdf Afterwards, I use the ls command to check whether ...
7
votes
3answers
15k views

how to reinstall xcode command-line tools?

I had serious problems from two versions of Xcode on the same machine. I removed all Xcode app instances & many other non-System 'xcode'-related files, then reinstalled the app (4.6.2), fixing my ...
0
votes
0answers
36 views

What will “rm -rf /” actually do?

I know that this is a very dangerous command, but what does it actually do. In other words, to what extend does it delete the hard drive. Does it delete only the user data? Or does it delete root OS ...
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
1answer
28 views

Terminal Command to display a single line from a text file in OS X

I want to display at a specific line, e.g. line 4, from a text file in Terminal (I need this for character counts, using wc). I'm sure this is a simple problem but read -e 1 filename doesn't do it. ...
4
votes
3answers
937 views

Dia command line not working

I've got a problem with using Dia from the command line on OSX 10.7.4. I downloaded and installed the OS X dmg from http://dia-installer.de/download/macosx.html I've been using it to create graphics ...
1
vote
1answer
50 views

Can I install Compass in Yosemite WITHOUT installing Xcode or Command Line Developer Tools?

I'm trying to install several programming packages, but it turns out that I can't because I don't have Xcode or Command Line Developer Tools installed. Some (e.g. git) were easy to install anyway. ...
1
vote
2answers
539 views

Yosemite supplied curl stopped supporting https

I am having the issue that curl is failing to deal with https, and thus I cannot update Homebrew: brew update && brew upgrade fatal: unable to access 'https://github.com/Homebrew/homebrew/': ...
3
votes
1answer
86 views

What is the difference between shutdown command and doing shutdown from apple menu?

What is the difference between issuing command shutdown -h now in terminal and doing Shutdown from apple menu? Using command it's instantly power down the system. But via menu it takes around 30-40 ...
1
vote
1answer
19 views

Different values for du and du -h

On the command line, du seems to return twice the numeric value returned by du -h. Apparently, du -h resembles the actual file size, so what's the plain du value representing?
1
vote
2answers
105 views

How to use the flag -p of BSD split?

Manual -p pattern The file is split whenever an input line matches pattern, which is interpreted as an extended regular expression. The matching line will be the first ...
0
votes
2answers
61 views

How to keep original “date created” when copying via Terminal?

There are many questions online asking how to make the commands rsync and cp go about copying a file while keeping the "date created" attribute the same as the original instead of the time of copy. I ...
0
votes
0answers
23 views

How to turn off bash_profile from automatically opening when opening Terminal?

I recently changed the ownership of the .bash_profile file from root to MyUsername. Since then, when I start/open Terminal, the bash_profile file automatically opens too. To disable it from doing ...
36
votes
4answers
63k 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 ...
2
votes
1answer
209 views

How to disable Bluetooth Sharing via terminal?

I want to disable the Bluetooth Sharing that is located in the sharing preference section. I want to be able to disable it via terminal, does anyone have an idea on how to do that?
10
votes
4answers
3k views

Install shuf on OS X?

Ubuntu Linux has a great tool called shuf, which works like head except that it gives you ten random lines. I couldn't find it on Homebrew. What is the simplest way of installing it on OS X?
30
votes
7answers
11k 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?
0
votes
0answers
10 views

GUI alternative to ImageMagick Montage (very simple collage)

For example Instagram's pictures are quite low resolution. I normally join a few pictures together with montage (installed with brew, from ImageMagick project). montage IMG_7771.JPG IMG_7772.JPG ...
0
votes
1answer
2k 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?
4
votes
4answers
2k 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 ...
8
votes
3answers
3k views

How to programatically add folder to Spotlight “do not index”?

Is there any way to programmatically add a folder to Spotlight's "Privacy" tab? Either through Terminal or Applescript? Often I want to click on an item in Spotlight results in Finder, and have that ...
9
votes
4answers
1k views

Why is extracting this tgz throwing an error on my Mac but not on Linux?

I'm experiencing a rather odd problem, and I can't figure out what's going on. I have a tgz file, scip-3.2.0.tgz, that is throwing an error when I attempt to unpack it. The error is only occurring on ...
2
votes
1answer
59 views

Shell Script Commands Work Fine in Terminal But Not Via AppleScript

I have two commands that I need to run through the Terminal. They are cd /Users/[my name]/Desktop and curl 'www.google.com'>google.txt. When running these directly in Terminal they work just fine. ...
0
votes
1answer
40 views

How do I 'pause' in a .command-script?

I want to create a .command-script on Mac, to execute a series of commands on a remote server using SSH. My script looks something like this: ssh user@domain.com cd /var/www/website/ git pull ...
25
votes
5answers
4k views

Did `man ls > temp.txt`. Output textfile is corrupted

When I execute man ls > temp.txt the output text file is corrupted. By corrupted I mean that first and last letters in some words are overly repeated. Several first lines in temp.txt: LS(1) ...
6
votes
3answers
6k views

Command Line Tools fail to install OS X Lion 10.7.3 Xcode 4.3

I'm trying to install the command line tools to get gcc, make, and other goodies after a Lion upgrade. I went to Preferences → Downloads in Xcode and attempted to install the command line tools. At ...
0
votes
1answer
32 views

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

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 ...
0
votes
1answer
16 views

How to restore manually Saved State files of Terminal?

My MBR crashes quite often. Normally I've multiple terminal windows and usually they're restored after crash. However from some to time they're not restored, so for that reason I was doing the backup ...
1
vote
1answer
34 views

Launching Character Viewer (aka CharacterPalette) from command line

So, recently I have being using the Character and Keyboard Viewer a fair bit and set up simple Alfred keywords that toggle the launch/quitting of these apps so as not to have to leave the keyboard. ...
0
votes
1answer
48 views

how to run open -n applicaton name from command line?

I got these two lines that I want to run from a script file (on Yosemite 10.10.3). It works when running from terminal CX_LICENSE=LS open -n /Applications/Inspire\ Designer\ 10.0\ GA/Inspire\ ...
0
votes
2answers
58 views

Command Line Tools Difference?

Is there a difference between the command line tools that come with xcode and the ones installed with xcode-select? If I install xcode and then run xcode-select --install will the ones installed with ...
0
votes
1answer
32 views

Why BSD eval cannot run gtime?

I am considering this answer with GNU time which I installed by brew. data.txt hello amigo this line 3 and here we go 4 and 5 is here Code in BSD time time eval $(echo sed $(for i in 1 2 3 5; do ...
14
votes
4answers
6k views

How can I install the Command Line Tools completely from the command line?

I'd like to script the installation of the the Xcode Command Line Tools. On Mavericks, xcode-select --install will open a dialog prompting the user to install, but I'd like to trigger the install ...
28
votes
12answers
52k 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 ...
1
vote
2answers
37 views

Command line app location? (OSX)

I wrote a small tool as a cmd tool. Where should it be placed? Which paths are automatically scanned for searching an app? I want to avoid absolute path, because I have to track it on every system.
31
votes
4answers
18k views

MacPorts vs. Fink vs. Homebrew

I always used MacPorts to install and maintain my GCC compilers (4.4, 4.5, 4.6, 4.7, ...) and gnuplot. Now I've heard about Fink and Homebrew. I think these two utilities are gaining ground in the Mac ...
1
vote
1answer
42 views

How can I change 'history' command output?

So by default .bash_history stores 500 last used commands. I changed that to 5000 by setting HISTFILESIZE=5000 in .bash_profile It seems to work. Now when I do history it still prints 500 commands, ...
1
vote
1answer
42 views

Where should a command line tool store cache files in OS X?

/var/cache is missing, ~/Library/Caches seems to be for full-fledged applications rather than command line tools, tools I've seen in the wild do horrible things (like use the user's home directory). ...
0
votes
0answers
11 views

How do you change the default route to a VPN?

I'm connected to the internet via a public unsecured WiFi router with address 192.168.1.1. I have an OpenVPN connection to a remote router who's LAN address is 192.168.2.1. After I connect, I get ...