1
vote
2answers
92 views

Mac Terminal showing bash instead of my username

This makes it hard to know what directory I am in. I installed a version of python for school and now it says -bash-3.2$ instead of MyMacbook: ~$. I'm sure this is really simple, but I know nothing ...
1
vote
4answers
65 views

How to move only files with other equal filename but different extension in the folder

I have a lot of folders, some with mp3 files only, others with m4a files only, other with files of both extensions. I need to identify which folders have files in both extensions, then move the mp3 ...
0
votes
1answer
108 views

Understanding the scope and lifetime of environment variables in shell scripting

I'm pulling my hair out trying to understand shell scripting and passing environment variables, and what not. I'm trying to execute a PHP script from TextWrangler, that in it's turn opens a new PHP ...
1
vote
0answers
118 views

Mac: Run screen command from launchctl

I have a Python script that I would like to run on a Mac at system start up in a detached screen session. The Python File (foo.py): import time import datetime while True: print 'hello', ...
4
votes
2answers
679 views

How can I tell if OS X is connected to a VPN network from the command line?

How can I tell if OS X is connected to a VPN network from the command line? By running ifconfig without any arguments when I am connected, I see that there is a utun0 interface which appears to be ...
1
vote
1answer
290 views

starting mongodb from a bash shell script

I am trying to start a mongodb using a cronjob+shell-script combo. In the shell, mongoDB starts when I enter $ mongod, however my executable shell script fails with mongod: command not found. I ...
1
vote
1answer
215 views

How to run a shell script on a Mac (10.7.4) to auto install updates?

Im trying to run this shell script that is supposed to do this: This script uses the softwareupdate program on OSX to automatically check for updates and install them. It also logs all updates to ...
0
votes
0answers
114 views

Hitting left arrow in my Mac terminal during a console program execution displays characters ^[[D. Why?

These work fine when typing in the shell itself (no child processes, just the prompt) - I can edit the input line before submitting it as command input to the shell. But when I am running a program, ...
1
vote
2answers
203 views

Is there any fundamental difference between piping in mac and linux?

ps -e | grep bash sample output from a linux machine: 1128 pts/14 00:00:00 bash 7491 pts/7 00:00:00 bash 12651 pts/14 00:00:00 bash 16145 pts/2 00:00:00 bash sample output from a mac ...
3
votes
1answer
526 views

How can I run an AppleScript or shell command on Mac OS X at screen unlock?

Note that this is not the same as startup or login. I never log out of my machine and I want to run the script whenever I unlock the machine to start working.
1
vote
2answers
2k views

Mac server default file permissions

How do I change the default file permissions for files created on a Mac server? In case it's relevant, this is a Mac Mini running Mac OS 10.6.7. It's currently used mainly as a file server, and there ...
0
votes
1answer
127 views

Open Firmware - RAM Size

Is there a command to get the amount of RAM in Open Firmware mode (Cmd + Alt + O + F on startup)?
3
votes
3answers
2k views

Terminal strangeness after installing Xcode on Lion

I have a simple custom bash prompt: PS1="\[\e[47;1;30m\]\u@\h [\W] \!\[\e[0;32m\]$\[\e[0m\]" It worked great under Snow Leopard, and worked great in Lion until I installed Xcode. I installed Xcode ...
4
votes
2answers
8k views

How to change proxy setting using Command line in Mac OS?

I am using Mac OS and sometimes some work need to be done using a proxy so I need to change my proxy setting frequently. But changing proxy setting in System Preferences is very messy. Is there a ...
4
votes
3answers
3k views

What is the difference between Linux (Ubuntu) and Mac shell commands?

I use Ubuntu at work and a Mac at home. I was trying out some shell commands on my bash terminal on the Mac today but they didn't work. I was told both machines should operate UNIX commands so the ...
2
votes
1answer
262 views

What prompt is sh using when you type sh into Terminal?

When using the default PS1 prompt that MAC OS/Terminal comes with, when you type sh you get a new style prompt. station-4:~ user$ sh sh-3.2$ When you export your own PS1, this functionality goes ...
0
votes
1answer
1k views

Shell Prompt Colors on Mac OS X

I'm trying to add colors and customize the shell prompt on OS X Lion so I edited .bashrc and I can only see the differences for the root account. So, after I edit the .bashrc with: PS1="[\u][\w] :" ...
0
votes
1answer
410 views

Schedule tasks via shell in mac os x

I am writing some C++ code and would like that every 60 minutes, the code is "uploaded" to my external SVN repository. For doing this I just do "svn ci -m "some comment", but I want to do it ...
0
votes
1answer
413 views

Backup files to Windows share from Mac 10.3.9 schell script throws permission denied errors

So I have this script I'm working on to try and copy a couple files to a windows server as a backup. It appears as though I am able to mount the share well enough, however I seem to be unable to copy ...
0
votes
2answers
843 views

Best terminal for macos [duplicate]

Possible Duplicates: What's your favorite app alternative for Mac OS X's Terminal.app? Alternative terminal emulators for OS X Are there any alternatives for Terminal.app. Maby ...
0
votes
2answers
742 views

How do I prevent infinite recursion in X11 start-up process?

I wasn't able to run X11 or Terminal after rebooting my Mac. After digging around, I got them to work when I commented-out this line in my .cshrc: xset b off It appears that xset will attempt to ...
1
vote
4answers
495 views
4
votes
2answers
927 views

How to keep remote script running when dropping ssh?

I ssh from my MacBook to a remote Linux and started a lengthy script (import 2000000+ lines of csv text records into MySQL). Too bad I have to take away my MacBook one hour later. How can I keep the ...
2
votes
4answers
773 views

rm -rf: Unix thinks '-rf' is a file not an option

I run the following command in Terminal on my OS X Snow Leopard laptop: rm -rf /path/to/directory Normally, this deletes the directory and all contents/subdirectories. For some reason, though, it ...
5
votes
5answers
7k views

How do you get a shell on a Mac?

I have never used a Mac before. I recently went to an Apple store and tried to open a shell to try it out. But, I was not able to open a shell - no shortcut for it, not right-click-menu entry, ...
6
votes
6answers
4k views

Screen Capture - command line?

Is there a command line tool out there that can record your computer screen and audio device and then save that to a file?
3
votes
5answers
1k views

Mac Remote Shell

I am trying to create a remote shell on OS X with NC. I tried nc -l 1337 -e /bin/bash but it seems that the Mac version of NC does not support the -e option. Does anyone know how I can achieve a ...
4
votes
1answer
903 views

Mapping a Piped Shell Command in Vim

In a previous question I asked about outputting evaluated code to a new window in MacVim. I got a great solution, but it presented another question: How can I map a key command in my .vimrc that ...
3
votes
5answers
1k views

xargs command works on ubuntu, but not mac

I have the following line of code that I use to update my personal date variable in my projects to today's current date. This line works in Ubuntu's terminal, but the Mac terminal seems to be far ...
1
vote
1answer
916 views

Why are some files in ls -l on Mac OSX (Snow Leopard) tagged with “@”? [duplicate]

Possible Duplicate: What does the @ in ls -al mean? When doing an ls -l some files are tagged with "@" like this: -rw-r--r--@ 1 master staff 2074042 Feb 3 19:26 ...
1
vote
4answers
1k views

Shell environment for su

I have some aliases and modifications to ls that I'd like available at all times. Is it possible to set environment variables for use when I am logged in as root after I sudo up with sudo su?
1
vote
1answer
442 views

How do I run gvim within the same shell window?

I'm running gvim on my mac from /usr/local/bin. If I invoke it from a terminal window it opens it up in a new window. I'd like to get it to just run in the same window I'm already using. How do I ...
34
votes
2answers
5k views

Case insensitive tab completion in Bash

Is there any way to make Bash tab complete case insensitively? $ bash --version GNU bash, version 3.2.48(1)-release (x86_64-apple-darwin10.0) Copyright (C) 2007 Free Software Foundation, Inc. I am ...
11
votes
4answers
2k views

Equivalent/Alternatives for Alt+Dot in Mac

One thing i miss from the Linux shell is the Alt+Dot shortcut. What it does is insert the last argument of the previous command. It appears to be a trivial technique, but it's really useful. i.e. if ...
2
votes
3answers
3k views

How do I set my shell in Mac OS X?

I know I can set "Shells open with" in the Terminal preferences, but I'm curious if there's any system-wide way of setting this (similar to updating /etc/passwd in some Unixes).
3
votes
3answers
953 views

How to uninstall preinstalled UNIX software on Mac OS X?

Hey i want to uninstall some applications shipped with Mac OS that are a part of UNIX. My plan is to uninstall most of the default stuff to install it via Macports. That would make upgrading, ...
5
votes
2answers
190 views

Can I have a bunch of tabs set up when I launch Terminal?

Every morning I launch the OS X app Terminal and tediously set up a bunch of tabs... A ssh session to a certain server ($ ssh ...) A script/console session for the Rails app I'm working on ($ cd ...