1
vote
1answer
37 views

How to find out process that uses file but is not using at the moment?

Background I, as well as many other people according to Apple's support forums, am having some trouble with the audio settings on my Mac. Whenever the computer sleeps or powers off, the audio resets ...
0
votes
1answer
32 views

How To Find SVN on my Mac

I'm very wet behind the ears on my Mac as I'm a windows developer. I'm trying to find out if I have SVN installed and where it is but I cannot even figure out this basic task. I've got a terminal ...
0
votes
0answers
35 views

How to open a local file with a query string appended to it in the default browser?

I want to do something like this from a shell script: $ open 'foo.html?foo=bar' Sadly that fails, as it looks for a file named foo.html?foo=bar instead of foo.html before opening the browser: The ...
1
vote
1answer
44 views

Launch and pass scripted commands to a Terminal script

I've got a.command, a script that waits for user entry (like typing something and then hitting return) It loops forever-ish. For example, it tells the user if their entry is a leap year, or its a ...
1
vote
2answers
200 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 ...
0
votes
0answers
29 views

Set X11 to open scripts by default

I am really new to Mac as I don't own one. I have created a ruby script on windows that I like to open an a Mac. I would like to set X11 as default "program" to open scripts instead of the one ...
0
votes
0answers
17 views

How to use cd command on OSX to view the contents of folder that the name has space [duplicate]

I would like to know how to view the nested folder of Application Support folder in blew. Could you tell me how to view the folder? apple-no-MacBook-Pro:Library apple$ ls Accounts GameKit ...
1
vote
1answer
400 views

Mac OSX Mavericks - ZSH can't 'source ~/.zshrc', too many open files

I can't source any changes to my .zshrc (or my .bash_profile for that matter), because I get this error when I try: /Users/ME/.zshrc:source:100: too many open files: /Users/ME/.zshrc I've tried ...
7
votes
2answers
434 views

How can I determine if an application is not responding?

I have an application on OSX that repeatedly goes into a Not Responding state and has to be force killed. I was hoping to automate it, but when inspecting the process with ps I don't see anything ...
1
vote
2answers
746 views

Apple Mavericks - why doesn't this one-line BASH script set my Python virtual environment like I expect?

I have the following Bash script: #!/bin/bash echo $MYPROJECT_HOME/bin/myproject_venv/bin/activate source $MYPROJECT_HOME/bin/myproject_venv/bin/activate echo ...
2
votes
1answer
64 views

time command - output to a file

comamnd line: time myprocess outputs its results: OUTPUT FROM MY PROCESS real 0m1.954s user 0m0.086s sys 0m0.052s But if I do time myprocess > outputfile.txt my outputFiel.txt ...
1
vote
4answers
138 views

Mac OS X keeps “old” environment variable around

So far I had /Applications/play-1.2.5/ added to my $PATH variable. Now I'm working with 2.2.1, which I installed in /Applications/play-2.2.1 and changed in ~/.bash_profile (which is getting sourced at ...
0
votes
1answer
319 views

MAC OSX Mavericks, using bash to see “Get Info” attributes

I want to use my bash shell to see the attributes that are shown when you right click on an Application and click Get Info. The specific attributes that I want to know whether or not they are checked ...
0
votes
1answer
262 views

Unset Environment Variable in Mac

On Linux I can unset an environment variable (not set it to an empty string, actually remove it using the --unset flag like this: $ env --unset=DATABASE_URL rake assets:precompile This same command ...
3
votes
2answers
636 views

How does Mac OS X set the value of $PATH?

I have a basic understanding on how the $PATH can be set, but is there a documentation that fully describes where Mac OS gets all the paths that get appended to $PATH? I'm aware of things like ...
0
votes
1answer
709 views

Mac OS X 10.7.5 - console open with bash info - have i been hacked?

I woke up today and when I turned on my computer, I noticed that there was a terminal window open. It said the following: Last login: Wed Aug 28 16:44:16 on console mary-iMac:~ mary$ The terminal ...
0
votes
1answer
2k views

Use iTerm2 and Mac OSX 10.8.3 to open tabbed shells to specific systems

I'm still fairly new to the MAC and I have been seeking a way to script or use the GUI to accomplish the following. Open Iterm to a group of hosts and ssh to each of them in a tabbed view. In the ...
0
votes
3answers
129 views

Copy and paste UNIX executables to $PATH does not work?

Why is it when I copied the C compiler tools from the Xcode application folder to usr/bin (which is one of the $PATH for Mac OS X), Terminal doesn't seem to be able to see it? Running a find command ...
2
votes
4answers
582 views

Replace existing folder with mv command

Apologies if this question has already been asked, I couldn't find anything… Lets say I want to replace 'oldstuff' with 'newstuff'. Basically re-naming to replace. I try using this command: mv ...
0
votes
2answers
468 views

Mac OS X login script for specific user

I need to be able to run a bash script every time a specific user logs in. The solution here is for all users. Is there any way to specify the user, and if not is there a way for the bash script to ...
7
votes
5answers
4k views

bash execution time in milliseconds (mac osx user)

I've checked this , but the solution provided did not work for me. Using date I can get the execution time in seconds: T="$(date +%s)" #some work here T="$(($(date +%s)-T))" echo "execution time ...
0
votes
1answer
49 views

Modify Several Plist Using a Script

defaults read /New.plist itemName the Output Will Be Some Thing Like "Software" but i want the new Data to be updated for the key as "Software Old Version" the problem is i have to modify several ...
0
votes
0answers
17 views

rvm cluttering up my environment vars

I was trying to see a list of my environment variables in Bash (Mac Terminal) by typing set. But when I do, I am overwhelmed by a bunch of functions apparently defined by RVM. Is this supposed to ...
3
votes
2answers
752 views

Get app names and version with BASH and Plistbuddy

I'm trying to feed the Application directory into an array and then use PlistBuddy with the entries to retrieve version info about each application that are installed. Currently it seems to be not ...
1
vote
0answers
95 views

Bash Read All Characters [closed]

I need to be able to read every key that can be pressed with bash. This includes the arrow keys, esc, and the function keys. The command "read" is not going to work because some characters are more ...
0
votes
3answers
1k views

Bash Resize Terminal Xterm

I am looking for a universal builtin command that resizes Xterm based terminals. This is some sort of command that won't make a new window, that I won't need to include in the file that these ...
1
vote
2answers
182 views

How to restore Unix terminal

Some times my Unix terminal gets destroyed, either by: I can type commands, but characters are not echoed on the screen. When I press enter, the prompt is printed on the same line as the current one ...
1
vote
1answer
122 views

Change mac terminal settings from the command line

I can change the appearance of Terminal by typing Cmdi and picking from the list of saved settings. Is it also possible to do this directly from the command line? I would like to write a bash script ...
4
votes
2answers
387 views

why error code 1 returned by loading .bash_profile in Mac

Whenever I open a bash terminal, the error code 1 is returned: Last login: Tue Jan 15 16:19:53 on ttys000 spam@moss:~ $ echo $? 1 I found this is caused by last line of code in my .bash_profile: ...
2
votes
1answer
640 views

ssh Mac Unix: copy a file with special characters and spaces

I am remote logged into a Mac and trying to copy a music file from one directory to another, but I am getting an error. I think it's caused by spaces or special characters, but not sure. the file ...
0
votes
1answer
554 views

Mac OS X terminal and PATH variable

I've added PATH variable definition to my ~/.profile file: Here it is: export ...
0
votes
2answers
729 views

using sed to print next line after match

I came across various examples on printing next line after a match, that use awk and sed. I'm using it in my code and it works fine. Now I want to use a variable instead of a hardcoded value for the ...
2
votes
1answer
741 views

Mac terminal: Resource temporarily unavailable

I'm getting an error message in the Mac Terminal when I try to run several different processes. I did some googling and looking on this site, and found out that it might be related to having too many ...
1
vote
2answers
213 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 ...
2
votes
1answer
90 views

Open application with lowered privileges

I have a mac installer which runs as root with pre and post install bash scripts. At the end of the post install script I launch the application which inherits and opens as root. Is there a way I can ...
3
votes
1answer
573 views

How to make alias/function in .bash_profile for `curl` that takes an argument?

I found this tip super helpful, for using curl to resume an interrupted file copy. The full syntax is: curl -C - -O file:///Volumes/path/to/file I would like to add an alias or function called ...
1
vote
2answers
265 views

Mac - every command outputs 'Process completed'

(2009 MacBook Pro running Snow Leopard — OS X 10.6.8) I believe this is related to installing MacPorts today — although the other thing I did before I noticed any symptoms was install a trial of ...
3
votes
1answer
484 views

Why does ˜/ not work on my Mac?

If I try to cd ˜/ it responds: -bash: "cd: ˜/: No such file or directory" I also don't seem to have a .bash_profile or .profile.
1
vote
1answer
777 views

How to fix the “-bash: command not found” error?

I get this every time I open terminal on my mac after a ruby course: -bash: xzc: command not found -bash: z: No such file or directory -bash: cx: command not found -bash: zcx: No such file or ...
3
votes
1answer
2k views

Processes on Mac OSX getting 'stuck' and strange CPU usage

I work in a scientific institution and one of the tasks I'm currently working on involves running simulations and outputting the data it produces on-the-fly to hard disk. When I say 'on-the-fly', I ...
-1
votes
1answer
221 views

How do I find out why a bash script starts on my Mac? [duplicate]

Possible Duplicate: bash process uses 90% CPU, comes back on computer restart A bash script is starting on my Macbook air. (I bought it yesterday). The script is taking about 20% of my ...
-1
votes
1answer
335 views

What does this example bash startup script do? [closed]

I am trying to set up GNU Octave on my computer (Mac OS X 10.7.4). I am newbie in using Terminal and I need help to understand what the following script actually does: if [ -f ~/.bashrc ...
0
votes
1answer
131 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)?
0
votes
1answer
454 views

osx: setting default python for files in terminal?

How do I set the default python for running py files without "python" keyword i.e $ django-admin.py manage.py startproject" in bash shell?
4
votes
3answers
965 views

How do I learn bash shell scripting?

I am a mac user and a web developer and I would like to create automated tools to manage my workflow. Say a single command to start up a type of website. What parts of bash shell scripting should I ...
1
vote
3answers
3k views

How do I count the total number of words of all files in a directory (and its subdirectories)?

I am thinking I can do this with wc somehow, if there was a recursive option but I am not sure. I want a grand total of the total number of words in the files under a directory and its subdirectories ...
8
votes
7answers
468 views

Is there a way to jump to an earlier part of a command line command in the Mac Terminal?

I'll often find myself writing out long commands in the bash shell - things with many arguments, web addresses, routes, etc and so on. Every so often I will realize I forgot to, say, put my "bundle ...
2
votes
1answer
1k views

Why won't my bash script work?

I'm getting more comfortable with the terminal in Mac OSX and I thought I'd have a dabble at bash scripting. Not wanting to crawl before I could sit down I wanted to write an incredibly simple "Hello, ...
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 ...
0
votes
3answers
338 views

Issue with ./configure not being found

I recently upgraded to OSX Lion, and I have been clearing a lot of thing out in my dev environment that is not being used anymore. My ./configure has seem to have disappeared, and I have made sure ...