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)

0
votes
1answer
17 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 ...
1
vote
1answer
21 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
2answers
44 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 ...
0
votes
0answers
13 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
54 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 ...
0
votes
0answers
34 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 ...
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. ...
1
vote
1answer
49 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
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?
0
votes
2answers
57 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
22 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 ...
3
votes
1answer
82 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 ...
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 ...
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 ...
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 ...
0
votes
1answer
29 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 ...
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) ...
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 ...
1
vote
2answers
36 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.
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 ...
0
votes
0answers
106 views

Does OSX 10.10.4 support LZMA compression at the individual file level (not tar files)?

From the command line, I would like to compress some database dumps using the LZMA algorithm. And, OSX adds XZ support (written in October of last year), claims " It turns out the XZ support in OS X ...
1
vote
0answers
109 views

Get rid of the “Instruments wants permission to analyze” prompt, from command line, in Yosemite

In our jenkins build automation environment we have several OSX nodes, now all updated to Yosemite, where we run ios simulator tests. The problem is that on any newly introduced node simulator tests ...
2
votes
1answer
58 views

MacBook Pro HDD corrupted files and bad blocks? Find command running for 4 days; Disk Utility reports no errors

Computer: Late 2011 MacBook Pro 13" Factory 500 GB serial ATA (5400 RPM) HDD Problem: A few days ago my computer started running extremely slow — could barely perform the most basic functions ...
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 ...
1
vote
2answers
104 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 ...
1
vote
1answer
126 views

Terminal Command Line to find corrupted files

I do have just one corrupted photo into my Photos Library. Is there is any UNIX command line that I can use in terminal in order to scan my Photos Library Folder and find out which file is corrupted? ...
1
vote
0answers
67 views

Command Line Tools update description of changes

When Apple provides updates for OS X and other software it typically also describes the changes introduced in that version, as displayed in the App Store application's Updates tab or in a separate ...
0
votes
0answers
21 views

Terminal: “command not found” [duplicate]

I have issues with my Terminal, after every command I try to run, it returns something like "command not found" or "No such file or directory exists" I think I caused it when I tried to run MineCraft ...
1
vote
3answers
52 views

Problem: How to clear all remnants of random.py, random.pyc, and random.pyo that isn't part of Python's standard library?

I wrote an import random code, and unfortunately saved it as the module's name I was trying to call. eg. random.py I believe, but am not sure, that I created the random.py file twice and thus I ...
0
votes
1answer
83 views

Warnings when installing pip

I just installed pip and got a few warning messages. Should I be concerned? Is there a way to check that pip was installed properly? Here's what I did: [mchenja@mycomp ~]$ sudo easy_install pip ...
2
votes
1answer
43 views

Does homebrew store tar.gz after package installation is complete?

If so, where? If not, where does it downloads it for the time of installation? I interrupted a package installation (brew install) and then restarted it. Do I have two tar.gz archives now? I thought, ...
0
votes
0answers
38 views

os.Popen command is not working

I'm writing a python script that is suppose to change default display settings for all users. I run the script as sudo because it needs to change every display. This line is suppose to change the ...
5
votes
2answers
93 views

Why does preview change the ctime of a pdf, and how can I disable it?

When I open a file in Preview, preview updates the ctime of the file. This seems to only happen once however, and as far as I can tell, nothing other than the ctime is changing. This is very ...
3
votes
2answers
115 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 ...
3
votes
3answers
368 views

Downscale a iMac 5K screenshot to 50% using commandline

Open the Screenshot in Preview Select “Adjust Size…” from the Tools menu Change the Width and Height to 50 percent of the original Change the Resolution to 72 pixels/inch I wish to do this on CLI ...
0
votes
0answers
131 views

mkfs.jffs2 or equivalence on Mac Os X

I need to use mkfs.jffs2 command on Mac OS X. On Linux, the command is installed with mtd-tools package, but I can't find it from homebrew. I tried to build from the source, but I have numerous ...
0
votes
0answers
37 views

How can I programatically remove folder from Finder's Favorites?

I installed one app which adds special folder to my Favorites sidebar in Finder. I like the app, but I don't like polluting the sidebar. Unfortunately, the app doesn't allow me to turn off the ...
0
votes
0answers
58 views

Partitioning a Hard Drive using “Logical Core Volume Group”

I have a series of scripts I use for repartitioning hard drives before a DeployStudio reimage. They're really simple: #!/bin/sh diskutil partitionDisk /dev/disk0 GPT JHFS+ Mac\ OS\ 10.10 100g JHFS+ ...
1
vote
2answers
52 views

“open or reload” html doc from command line?

I have a program which generates some html documentation. At the end of the script, I use the open command to automatically view the page in the browser. generate-document > index.html open ...
1
vote
1answer
38 views

What is wrong in this command about grepping and pandocing?

I am thinking this answer which returns a broken PDF document in OSX 10.10.3. The file test_dummy.tex is here. pandoc test_dummy.tex -f markdown -t html | grep -E '(^<|^$|^ *$)' \ | grep -v ...
1
vote
1answer
29 views

cannot locate app, locate not working

I have an app (gv) where I can run it from the terminal, but when I click on it, I get errors. This makes me think there are multiple instances of it or something. I tried which and got nothing... ...
1
vote
0answers
89 views

Changing color of text in terminal for program output

This might be answered already but I could not figure out a good way to phrase it to look for an answer so I hope you'll bear with me. I want to change the color of the text output on Terminal if it ...
8
votes
1answer
864 views

How can I take selfie by running a console command on Mac? [duplicate]

I know I can take a selfie with the built-in camera via the Photo Booth app. However, is there a way capture an image via command line, in sort of lolcommits style?