1
vote
0answers
10 views

How can I redirect OS X dtruss output when running with sudo?

I'm running dtruss on Mac OS X 10.9. Simple example is: sudo -c ls But I'd like to capture the dtruss output into a file. I saw something that suggests that I can do something like: sudo bash -c ...
0
votes
1answer
38 views

'localhost' stoped working as an alias for '127.0.0.1' for SSHing into my VirtualBox VM from OSX. Why, and how to fix?

The question explains the problem. For months I've never had any problems along these lines. Then, yesterday morning, I couldn't get into my VM! Took a long time to troubleshoot but here was the ...
0
votes
0answers
14 views

-bash: java: command not found MacOS 10.7.5

I recently "uninstalled" Java 7 because it isn't compatible with Chrome, following the instructions on this site: https://www.java.com/en/download/help/mac_uninstall_java.xml. Then I re-enabled Java ...
0
votes
1answer
23 views

Is there a way to eliminate the owner and group from `ls -l`?

I never need to see the owner and group for the files listed with ls -l (actually, ls -laF) and am wondering if there's a way to remove them from the output. So I want to change this: lrwxr-xr-x 1 ...
2
votes
2answers
49 views

sed error when launching terminal on OS X

I get these error messages when launching bash or zsh in standard Terminal.app or iTerm2 sed: 1: "\#^system_type=# { s#^s ...": extra characters at the end of p command sed: 1: "\#^system_type=# { ...
1
vote
1answer
34 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
0answers
11 views

How to prevent MacVim from inherenting .profile as if it was Bash itself?

I have this guard in my .profile: if [ -n "$BASH_VERSION" ]; then if [ -f "$HOME/.bashrc" ]; then . "$HOME/.bashrc" fi if [ -f "$HOME/.bash_aliases" ]; then . ...
1
vote
2answers
17 views

Can't run the Python interpreter in Mac's Terminal

At the moment i'm on Mavericks, and i just uninstalled homebrew. With homebrew i had installed python, but after uninstalling it my terminal can't start the python interpreter. I receive this message: ...
0
votes
1answer
24 views

running sac2xy returns sac2xy: cannot execute binary file on osx 10.9

I have a Python script for plotting data which uses sac2xy, but it gives an error when running sac2xy: sh: sac2xy: command not found the relevant part of code is : os.system("sac ./tmp/sac.m") ...
0
votes
1answer
14 views

Why doesn't __git_ps1 work in bash anymore on OSX with MacPorts?

After updating Macports today, I get -bash: __git_ps1: command not found. Why is that?
0
votes
1answer
34 views

Directories will list, but are not recognize by cd

New to terminal and having problems out of the gate. Using Terminal 2.1.2 on a Mac running 10.6.8. Using the "ls Documents" will list the contents, but when I try to change directories, which I tried ...
0
votes
0answers
22 views

How to run --args AFTER Google Chrome is already open

How do run --args after Google chrome is already open? open -a Google\ Chrome --args --"profile-directory"="Profile 1" ONLY works when Google chrome is not running and I would like to know how to ...
0
votes
1answer
30 views

What is the sequence of files bash loads to set PATH variable

I want to understand the way PATH variable is set in Linux/Mac. What all files are loaded and in what sequence to set the PATH variable for BASH.
2
votes
1answer
35 views

Automated conversion of .dvdmedia(VOBs) to format Plex can handle on a Mac?

I'm super impressed by Plex, and I'd like to convert all my old dvdmedia files into a format that it can understand. I have quite a few of them (the product of a dvd library being ripped to work with ...
0
votes
2answers
56 views

Unable to create a permanent alias in Mac OS

In Linux I can well to add alias to bashrc and it will become a permanent alias. In Mac OS I tried to do the same thing: vim ~/.bashrc export PATH="$PATH:$HOME/.rvm/bin" # Add RVM to PATH f or ...
-2
votes
3answers
59 views

osx bash grep - finding search terms in a large file with one single line

Is there simple unix command line i can enter which lets me isolate say 512 bytes either side of a search term, even if there is only one "line" in a very large text file? Ok, this should be easy. ...
0
votes
0answers
33 views

Why is there a bash process running in my Terminal if I use Zsh?

When I run the "top" command on OSX Mavericks, a bash process appears even though I am using Zsh, why?
1
vote
0answers
25 views

Dtrace shows posix_spawn called with only 3 argument. Trying to launch by hand

I ran dtruss on a process that launches another one: the League of Legends Launcher starts the main game process with certain arguments that I can't seem to pass via the command line. What caught my ...
1
vote
2answers
70 views

Use alias source with relative path

I want to add an alias file to my project folder to quickly open and edit files in it with a simple shell command. To make it more portable, I would like to use only relative paths. I want something ...
0
votes
1answer
30 views

Why does an ampersand in URL cause failure of some command in Mac OS X Terminal?

Why does an ampersand in URL cause failure of the following command? I want to open a web page by running Safari in Terminal, placing the URL as an argument. This works as expected: open -a safari ...
1
vote
0answers
15 views

Restore Launchpad DB from Backup using Bash/Terminal?

Context: I'm using an OSX shell script to update my settings system-wide after a fresh OS install. One snag I've ran into is restoring Launchpad. I have my launchpad DB backed up via GoogleDrive at: ...
1
vote
1answer
77 views

Open Google Chrome Specific Profile From Command Line Mac

I have been trying to open Google Chrome from command line but with no luck! I have tried How do I start Chrome using a specified "user profile"? My goal is to open Google Chrome with a ...
0
votes
1answer
44 views

How can I install my script into the user's $HOME/.bin (or $HOME/bin) directory and make sure that is in their PATH?

Edit: places where I said $HOME/.bin I should have written $HOME/bin or any equivalent is fine. So I have a bash script which I am distributing as a client for my API. Current version installs like ...
0
votes
1answer
52 views

Issue with RVM conflicting with Brew?

Please bare with me as I am not an expert on bash. In fact I'm fairly new to OSX < 1 year. I ultimately would like your help to get my system configured optimally, thus removing unnecessary tools. ...
0
votes
2answers
100 views

How to automate shell script to run when I open a particular app in OSX?

I've been running into a rut recently with one project I've been trying to accomplish. Using Automator, but I don't know how to exactly to go about this project. There's this script editing app called ...
0
votes
1answer
30 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
1answer
28 views

not found error when executing bash script on Mac OS

I'm trying to build jDom-b4(a Java library) from the source with the script provided in the source. The content of script named build.sh: #!/bin/sh echo echo "Java and XML Build System" echo ...
0
votes
0answers
95 views

Local echo using Screen to connect to a serial terminal

Reading through the book "Building Wireless Sensor Networks" I learned that you can use the Screen utility to attach to a serial console. I tried using it to connect to an XBee module and it seemed ...
1
vote
3answers
41 views

Invalid Argument when moving items to new directory. Command works anyway

Here are the steps I took: cd ~ nano .bash_profile alias dtcl='cd ~/Desktop; mv * Desktop\ Cleanup' Ctrl - X Y Save If I run dtcl, it totally works. It moves everything ...
1
vote
2answers
118 views

If, else based on command piped to grep

I can't figure out how to make this (what supposed to be simple) script to work. Basically what I want, to run different stuff based on the state of my Parallels vm, something like this: if [ prlctl ...
1
vote
1answer
22 views

How can I restrict a bash find to only specific sub-sub-directories

I'm trying to list all the files in a specific sub-directory but different directories which are themselves on a different volume. The following works, but only on a fully specific sub-directory (and ...
1
vote
1answer
179 views

How to rename the file name with timestamp of created date by JavaScript, Perl or shell on OSX?

Could you tell me how to get timestamp of created date of file and rename the file name with it by JavaScript, Perl or shell on OSX 10.9.2? Example: Existing: Untitled.txt timestamp is 2014/05/03 ...
0
votes
1answer
24 views

Brace expansion seemingly not working in Bash 3.2.51 on Mac OS X

I have a bunch of LaTeX files on my Desktop: ma 512 hw 11.log, ma 512 hw 11.aux, ma 512 hw 11.tex etc. I want to use brace expansion to print them to the Terminal. E.g., ls *.{log, aux} But ...
0
votes
2answers
18 views

Adding logic to 'find' directories containing either [criteria A] or [criteria B]

I have inherited a vast media archive without a unifying organizational scheme. Its contents date back at least 10 years. I have been asked to find a needle in this hay stack, and I have some guesses ...
0
votes
0answers
47 views

Bash History Under OS X (Mavericks)

Why does my bash history under OS X never seem to persist for more than an hour or two (or a day, at most)?
2
votes
2answers
58 views

My cursor is at the beginning of my bash prompt. Any ideas why?

I'm using a slightly modified version of Gary Bernhardt's (destroyallsoftware.com) .bashrc with homebrew bash 3.2.51. # . ~/bin/bash_colors.sh . ~/bin/colorize.sh [... snipped ...] # ...
1
vote
2answers
107 views

/usr/bin/env: bad interpreter: Operation not permitted

found some answers here that didn't help me so much ohad@Macintosh-2:/Volumes/develpment/global_constants (master *+)$ node_modules/.bin/mocha -w bash: node_modules/.bin/mocha: /bin/csh: bad ...
0
votes
0answers
13 views

Run a service action with a file from a shell script

I use CloudApp and it has installed a handy service called “Upload to CloudApp”. I'm writing a build script that I want to hook into this service. Every time it is run I want it to upload the file ...
1
vote
1answer
28 views

Strange probs with popd and pushd

Just when I thought I got popd and pushd, when I tried to practice on my own...it all went to hell. I removed the temp directory.I verified this by going through Finder. Then I made a new set of ...
0
votes
0answers
39 views

Unable to run tmux on OS X

So I got brew on my mac and I had tmux installed and running just fine. Then after I refreshed my system every time I try to run tmux i get this error: "-bash: tmux: command not found" So since I'm ...
0
votes
2answers
49 views

Please help me visualize popd and pushd

I'm working through The Command Line Crash Course. I've been doing really well, but now find myself completely stumped at popd and pushd. I've read the analogy of a stack of plates or pancakes. I ...
1
vote
0answers
40 views

Unable to access samba file share after mounting on Mac

I am trying to automate mounting, copying a file to a samba shared folder and then unmounting the drive from my Mac. I wrote a simple bash script to do it #!/bin/bash echo "Mounting Drive" mkdir ...
0
votes
0answers
50 views

How can I get Homebrew and MAMP (Pro) to play nicely together?

I am using MAMP Pro for most of my local application development and am trying to install ruby , etc via homebrew however homebrew will give me the following warning: Warning: "config" scripts exist ...
0
votes
1answer
19 views

touch -d alternative in MAC OS X

I need to change modification time of all my files in a folder 1 hour back (daylight saving issues with some software) The thing is that touch -m -r {} -d '-1 hour' Doesn't work on MAC OS X Any ...
1
vote
0answers
42 views

Terminal's bin/bash not responding

I have Googled through several instances of this issue but cannot get Terminal to open up with bash. I restarted the program, the computer and even logged in through another Administrator account but ...
1
vote
1answer
85 views

How to edit ~/.bash_profile file?

I am using Mac and want to edit the file .bash_profile using a text editor. These are the file's permissions: $ ls -l .bash_profile -rw-r--r-- 1 root staff 55 Feb 24 12:07 .bash_profile When I ...
1
vote
3answers
62 views

start program via SSH as different user

Problem description: there are two Macs, #2 one logged in with exampleuser and #1 I am logged in as admin. exampleuser doesn't have SSH rights at all, as it isn't an administrator. admin has full ...
0
votes
1answer
667 views

$PATH - No such file or directory MAC OSX - Terminal

A million different version of this have been asked already, but I'm still lost, sorry. Here is some of what I'm getting back... In a terminal: $PATH -bash: ...
0
votes
0answers
30 views

Automate whois lookup with Automator

I would like to automate a whois query script using automator. And as I have read from a past Q&A, I've already done this: Get Specified Text xxx.xxx.xxx.xxx Run Shell Script for x in "$@"; ...
0
votes
2answers
55 views

cat wc -l count lines line with defined line endings (e.g Mac OS X specific)

As any command-line user I sometimes want to count lines in text file with well known command: cat some_text_file | wc -l I face the problem on Mac OS X, which as far I have it studied is connected ...