A type of user interface for a computer. This can be both command line or graphical user interfaces. More commonly, shell often relates to the command line interface.

learn more… | top users | synonyms

0
votes
1answer
650 views

How to use automater to run mongo db and node.js app on startup

I'm trying to use Automater(first attempt of using this software) to create a sequence that will automatically run ./usr/mongo/bin/mongod and ./usr/mongo/bin/mongo then run my node.js server app at ...
4
votes
2answers
6k views

Editing System Preferences via Terminal

Am looking to edit system preferences settings via the command line but cannot for the life of me find the correct names of variables. In Login Options under Users & Groups, I would like to be ...
5
votes
4answers
5k views

How to reset $PATH?

I was trying to add something to $PATH and it went totally wrong. I now can't run any commands such as ls. I've looked at this answer and used the following lines: ...
0
votes
1answer
178 views

TimeMachine restore issue

Times ago I did a "restore from time machine backup" in order to restore all my files on a new SSD I bought for my macbookpro (with OSX Lion), and all went fine. Today I installed Mountain Lion on ...
0
votes
0answers
341 views

A working applescript fails when running via cron

MacOs 10.8.2 I have 2 applescripts shown below. They are arranged in one shell script to run one after another by using osascript (just to simplify the example). Everything works fine when starting ...
3
votes
1answer
145 views

Detecting that a script is run within ARD

Does anyone know of a way to detect that a shell script is running within ARD (vs. running the same script locally on the machine)? I looked at detecting that we are running in interactive mode - ...
2
votes
1answer
2k views

How can I open Google Chrome in Presentation mode using a shell script

Previously in 10.6.8, I was able to start Google using open /Applications/Chrome.app --args --kiosk http://www.google.com Now, on newer systems, that does not work anymore correctly. The only way to ...
0
votes
1answer
176 views

Script to Update/download most recent iTunes podcast WITHOUT opening iTunes at all?

I have a couple favorite podcasts that I subscribe to in iTunes. I'm using You Control (so I don't have to open iTunes to play my music). I'm using Keyboard Maestro. I've made a macro that runs ...
1
vote
1answer
663 views

How do I make terminal sessions resume on Lion with iterm2 and tcshrc

My understanding is that with Lion my terminal windows should restore their state. However, this does not happen for me. I wonder if this is because I use tcsh instead of bash? Is there something I ...
3
votes
1answer
7k views

How do I find what packages I've installed via terminal?

I've been learning the shell for a few weeks and have installed several packages. I know/remember what some of them are, like oh-my-zsh and emacs 24 (which was a nightmare to upgrade to), but not sure ...
0
votes
0answers
334 views

License problems installing aquaterm via macports

I am trying to install aquaterm via macports. I run sudo port install aquaterm This gives back an error: ---> Building aquaterm Error: org.macports.build for port aquaterm returned: command ...
5
votes
1answer
342 views

How to isolate the most disk-active process(es) in OS X?

I have some process(es) performing a lot of drive access from time to time, however I've hitherto been unable to isolate which process or processes are performing the access. What shell command can I ...
1
vote
2answers
908 views

Why sh -c 'echo -n 1' is different from bash -c 'echo -n 1'

I am on a Mac Book Air, OSX 10.8. I am trying to understand why these two snippets do not print the same output. sh -c 'echo -n 1' outputs -n 1 whereas bash -c 'echo -n 1' outputs 1 as expected. ...
1
vote
1answer
310 views

How can I make autocomplete in the shell work with case-folding?

How can I make the autocompletion for files and folders in the bash shell work case-insensitively? Ideally, cd ~/doc + tab autocompletes to cd ~/Documents (correcting the case as it autocompletes), ...
2
votes
2answers
509 views

How can I reproduce the Finder sort order without asking Finder to sort for me?

I work with a large collection of mostly-text files subdivided by series, periodically mirroring them from an upstream repository and repackaging them using a shell script from a slightly chaotic ...
1
vote
2answers
110 views

How can I do the equivalent of a Unix find / -print [under user permissions] under Mountain Lion?

I am doing, or trying to do, a 'find /' which I would like to recursively list every file the user has permission to access under the volume "Macintosh HD" and nothing else. I am presently filtering ...
3
votes
1answer
1k views

How to fix lsregister failing associations after reboot? [duplicate]

Possible Duplicate: How do I remove duplicate “Open With” context menu items in Finder.app? I'm running 10.7.5 and I have noticed a problem with associations between files and applications. ...
1
vote
1answer
149 views

logger vs syslog -s

What exactly is the difference between using logger and syslog -s? According to its manpage, logger provides interface to the system log module, but I can't really see the point given that syslog(1) ...
2
votes
1answer
664 views

dyld message when launching commands as sudo

When I launch a command from the shell as super user I always get back the following message: dyld: DYLD_ environment variables being ignored because main executable (/usr/bin/sudo) is setuid or ...
1
vote
1answer
355 views

How do you prevent CodeRunner from prefixing its console output with [00m[00m[00m[00m[00m?

There seems to be a connection between CodeRunner's console output and your actual terminal prompt script, that is, if such prompt code is sourced from e.g. ~/.bash_profile (which CodeRunner reads by ...
1
vote
1answer
124 views

Colorful make compilation output

When I used Ubuntu, I remember that the output of make/gcc/g++ had nice colors, which were particularly helpful when needing to quickly identify errors (they were red). Is there a way to enable ...
2
votes
2answers
603 views

Exclude files from “central metadata store”

I'm fairly familiar with the mdfind utility. I find it's very useful when I can't find a file or when I need to find a file with certain contents. The problem is that I need to exclude some files from ...
6
votes
4answers
3k 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 ...
6
votes
2answers
694 views

How can I have my shell always start in a certain directory that is not my home directory

I've tried putting cd /Users/my_name/my_directory/structure in both .bashrc and .bash_login but neither works, i.e. when I open a new terminal window I am in my home (/Users/my_name/) directory. ...
7
votes
1answer
2k views

How can I format the output of ping in bash?

I am using the following script to cycle through a list of IP addresses and report back on the % of packet loss. I'd also like to have the IP address printed first, then its % of packet loss. But I ...
1
vote
2answers
2k views

Change Date Created based on the filename

I've downloaded a bunch of my Instagram images but the Date Created of the files is set to the time that I initiated the download. What I do have though is the Date Created in the filename. What I ...
6
votes
2answers
2k views

How can I kill a process using top on OS X?

On other Unixe,s I can use top and then hit K and type the process ID. How can I do that in OS X? I can type kill [the_pid] on its own at the command line and that works. However, I was wondering if ...
1
vote
2answers
1k views

How to fix locate.updatedb not respecting directory excluded from /etc/locate.rc?

I wanted to exclude some directories from the results of /usr/libexec/locate.updatedb by editing /etc/locate.rc. Unfortunately if I edit locate.rc locate.updatedb runs forever and does not actually ...
3
votes
2answers
1k views

What terminal commands are new or updated in Mountain Lion?

Where can I find a list of new or updated terminal commands or features for Mountain Lion? Lacking any list, does anyone have a sugguestion on how to generate that list? (some combination of ls ...
33
votes
5answers
5k views

Is there a way to access a Mac's geolocation from terminal?

Some GUI apps use OS X location services, but I want to retrieve a Mac's physical location from the command line. This could be useful for running scripts, switching settings etc. The mechanism should ...
0
votes
2answers
452 views

How to get the path of the selected Image in Adobe Bridge via Applescript?

I am trying to get the parent file path of a selected image thumbnail in Adobe Bridge CS5.1 to pass it on to a shell script. An Applescript wraps a tiny javascript command in command like this: set ...
6
votes
2answers
223 views

How to automatically watch for file changes and perform a custom action inside shell?

For example, I'd like to automatically run YUI Compressor whenever I edit a JavaScript source file to output a compressed version. Ideally the process does not run in the background but in a ...
3
votes
2answers
4k views

How can I temporarily suspend some users, hiding them from the login screen?

I have to manage a shared OSX workstation that is used by a rotating cast of characters throughout the year. The login screen quickly becomes cumbersome when users that aren't even around for a while ...
5
votes
2answers
1k views

How to mount a RAM disk on startup?

I'm trying to mount a RAM disk on startup with this: /Users/Aram/Development/Tools/ramdisk.sh diskutil erasevolume HFS+ "RamDisk" `hdiutil attach -nomount ram://800000` com.aram.ramdisk.plist ...
1
vote
1answer
390 views

How can I set Last Modified Date of file after using HandbrakeCLI to convert a file?

Running this on OS X Lion. I'm batch converting several hundred home movies using Handbrake CLI. I'd like to set the last modified date and created date to that original file. I'm using the ...
76
votes
5answers
34k views

How can I trigger a Notification Center notification from an AppleScript or shell script?

I'd love to be able to take advantage of 10.8's Notification Center features in AppleScripts and shell scripts I write. Is there a built-in command or a third-party library I can use from either an ...
3
votes
3answers
530 views

How can I see how long my computer has been active (as in not idle)

I've seen a variety of solutions to check how long my machine has been idle, and I know I can check how long since last reboot with uptime, but I'm curious if there's a way to see how long since my ...
5
votes
3answers
697 views

pbpaste, pbcopy using wrong pasteboard?

I'm converting a shell script which xclip and similar tools on Linux, to use pbpaste and pbcopy on Mac. The problem is the default pasteboard ('general' according to the man-page) for these tools is ...
6
votes
2answers
976 views

Change my shell to a different bash version at /usr/local/bin/bash?

How can I set my /usr/local/bin/bash (which is the 4.2 version that allows auto-completion of 'cd to directory with directory name') to be my default bash for a new window instead of my regular ...
1
vote
2answers
2k views

How do I run an OS X command script on remote Xserves from a desktop OS X script?

The answer to an earlier question, Access and control home office network, iMacs, and Xserves, left me with a new problem. To review, I have a computing environment comprised of: 27" iMac with dual ...
11
votes
2answers
1k views

cd to a directory by typing its name?

For example if a directory 'blob' exists and I just type 'blob[return]' then the system cds into the blob directory for me. In Linux (Ubuntu) I can add shopt -s autocd to my .bashrc file, but on OS X ...
2
votes
4answers
1k views

Editing System/Library files with Property List Editor (PLE)

I want to update the schedule in /System/Library/LaunchDaemons/com.apple.locate.plist. I have unlocked the file in Finder but the Property List Editor is giving me: The file ...
23
votes
3answers
35k 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 ...
4
votes
1answer
373 views

How do I find where an environmental variable got set?

I installed a program to try it out, and decided I didn't like it so I moved the app to the trash. Today, in my shell, I noticed that there are a couple of PROGRAMNAME_BLAHBLAH environmental ...
1
vote
1answer
590 views

Open PDF in full screen from the command line

I've written a simple-minded "take a break" reminder which just opens a PDF notice. This works fine, but I wish I could open the PDF file in full screen mode from the command line. Does anyone know ...
3
votes
1answer
874 views

-bash: Applications/mvim: /bin/sh: bad interpreter: Operation not permitted

I am getting a weird error with the mvim script that is supposed to start the MacVim interface. See below for the issue. /bin/sh is just fine, mvim was chmod +x'd, other /bin/sh scripts run fine... ...
16
votes
2answers
11k views

Amending PATH so that /usr/local/bin is ahead of /usr/bin

I'm trying to install brew but get the following warning: Warning: /usr/bin occurs before /usr/local/bin This means that system-provided programs will be used instead of those provided by Homebrew. ...
2
votes
1answer
218 views

How to search files from command line under OS X?

It seems that Apple doesn't want us to use locate, at it is making it so hard to setup. If there a way to use finder database from the command line? Maybe I can make an alias. I would appreciate ...
8
votes
3answers
252 views

How can I automatically keep track of in-office hours when I connect to my office Wi-Fi?

I'm looking for a solution that starts a timer whenever I sign in to my office wifi and stops it when I've left. It should essentially log the hours I've spent at the office. I'm aware that there's ...
1
vote
5answers
5k views

How do I fix Terminal.app when my shell has been set to an illegal value?

Today I was mucking about trying to uninstall macports when I noticed an error being thrown up whenever I used sudo. I killed Terminal and tried to restart it which failed with the error message ...