Tagged Questions
0
votes
1answer
46 views
Cleaning up my .bash_profile: Can I delete some of this?
I'm not a Unix guru.
I'm running OS X 10.8.3 Mountain Lion. Today I removed Macports from my machine. I believe macports left some cruft in my `~/.bash_profile which I would like to remove (the ...
0
votes
0answers
22 views
Making checks before rsyncing external drive on OSX
I have the following issue on OSX though I guess this could equally be filed under bash. I have several encrypted portable drives that I use to sync an offsite data store or as an on-the-go data store ...
0
votes
1answer
29 views
How do I make a bash script so that I can drag its input on top of the icon?
I need to make a bash script to that I can drag a .rar file on top of it and then the script will receive the pathname of that file as argument 1 ($1). I have made the bash script, but how do I make ...
1
vote
0answers
26 views
Terminal configuration lost after booting up
On OS X 10.8.3, my Terminal.app is configured with my .bashrc file. In my .bash_profile I have:
source .bashrc
It works great, except when I let some Terminal windows opened and shut down the Mac. ...
0
votes
1answer
31 views
Python launching problems OS X
I'm trying to install python on mac OS X 10.7.5. I installed it from MacPort and I think before I did, I screwed up $PATH somehow. It seems to install fine but then when I try to run ipython I get
...
0
votes
1answer
53 views
How to enable Maven autocomplete on Mac OS X command-line?
When using Maven (mvn) on OS X Terminal, how can I get tab-completion for Maven goals, plugin names, etc? Things like this:
mvn pa [TAB] -> mvn package
mvn je [TAB][TAB] -> mvn jetty:run
5
votes
2answers
293 views
“Airplane Mode” in OS X. Alternative command for `rfkill`?
This question is an exact duplicate of this post from
superuser.exchange.com. I believe this is a valid question for both of sites
and hope I am not (if any) violating stackexchange policies.
...
1
vote
1answer
132 views
How to set up multiple PATHs in the user bash_profile in OSX 10.8?
I am looking to set up my laptop for both Python development and Phonegap Android development in OSX 10.8 using Eclipse. I installed the lastest version of Python (3.3) which added the code:
# ...
1
vote
1answer
31 views
How to change some information in a shell prompt.
I opened my terminal and saw a shell prompt.
Last login: Fri Feb 15 15:28:16 on ttys000
john:~ voloda2$
How do I change john to alex?
0
votes
1answer
31 views
Terminal not logged in properly
I'm having a bit of an odd issue with my terminal.
I'm used to the prompt being Joosts-Macbook:~ Joost$ or something of that nature, but all of a sudden it displays a number I don't recognise: ...
1
vote
0answers
34 views
Most efficient way to get all files in a directory
I have a million+ files spread across four fiber-connected arrays. I need to get the path, filesize, and last_modified date to insert into a mysql database. What would be the best way to do this?
...
4
votes
1answer
145 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
0answers
31 views
pbpaste and aira2
I'm creating alias to do few things and run into a problem:
Alias executes couple commands and on success starts download of resulting url, which is being copied into clipboard. Everything works fine, ...
1
vote
3answers
396 views
Alternative to APLAY for Mac OS X bash
Anybody knows any Mac alternative for Linux's APLAY program? I would like to run this script:
echo ...
1
vote
1answer
225 views
How do I launch shell applications after changing shell to MacPorts bash?
I have installed a current bash version via MacPorts and changed Terminal.app to use /opt/local/bin/bash. Unfortunately shell applications won't launch from Finder and Spotlight anymore. (OSX 10.8.2, ...
3
votes
3answers
544 views
How did my Mac end up with iPhone 4S as my host name in the user prompt in OS X terminal?
The other day I was searching for Xcode iOS 5 tutorials. About a day or two later, I noticed my terminal prompt is now "iPhone4s : myusername". Naturally , my biggest fear is that there could be a ...
5
votes
3answers
5k views
How is my $PATH variable built in Mountain Lion?
I've recently installed Homebrew on my Mac and it's complaining that /usr/bin occurs before /usr/local/bin in my $PATH variable, meaning that system-provided programs will be used instead of those ...
4
votes
2answers
163 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.
...
0
votes
3answers
352 views
Change owner for all files owned by x
I copyied files from my MacBook, mainly files from /usr.
The one and only user on my computer is called 'Julian' (like on my MacBook).
A lot of the copied files are now owned by '501' (id of "Julian" ...
0
votes
1answer
360 views
cd 'brew --prefix': no such file or directory
After these errors:
> brew update
fatal: 'origin' does not appear to be a git repository
fatal: The remote end hung up unexpectedly
Error: Failure while executing: git pull -q origin ...
0
votes
1answer
405 views
Can't get commands inside .bash_profile startup script to run
From my bash shell (latest version of Lion) if I issue the command...
source ~/sh/bashmarks.sh
The bashmarks.sh script will run and the functionality it provides is available. However I don't want ...
7
votes
4answers
2k views
AppleScript vs. Bash script?
I'm a long-time Windows "power user" and developer who has recently decided to move over to Mac OS X.
On OS X Lion and indeed previous versions there seem to be two main options for scripting and ...
4
votes
3answers
688 views
Is it possible to have bash escape spaces in pwd?
I'd like to copy the current directory to the clipboard, something like: pwd | pbcopy. However, pwd does not escape the space, so something in "Application Support", for example, doesn't copy ...
1
vote
4answers
602 views
Executables in /bin and /usr/bin are not found in path
Somehow I can’t execute files in /bin or /usr/bin without providing the full path.
This isn’t happening when running from Terminal, but, for example, iTerm can’t run bash (only /bin/bash), OnyX ...
5
votes
1answer
836 views
Why is a command line change to ~/Library/Preferences/com.apple.LaunchServices.plist not effective immediately?
When the Info window of Finder is used to associate files of a particular type with an application:
the preference is effective immediately.
When Terminal is used to make a comparable addition ...
1
vote
4answers
130 views
How to obtain Bluetooth ID (OS X)
I need to remotely grab the Bluetooth ID from multiple machines throughout my network. What are the best ways to remotely obtain the Bluetooth ID in OS X?
0
votes
1answer
222 views
Allow the Terminal.app to pass command key based keystrokes to terminal programs
I want to allow programs running in the terminal the ability to interpret the keyboard short cut Cmd + S
I have already Remapped the Terminals' default binding of Cmd + S to Ctrl + S via the ...
4
votes
3answers
1k views
sourcing bash profile for root users
Apologies in advance if this question is going to annoy the hell out of everyone as I appreciate, it's been asked in various ways many times before. Please be assured, I have read the archives and ...
0
votes
1answer
282 views
What is the Apple_PubSub_Socket_Render environment variable for?
After running:
env ; #from with in terminal
I see the following output:
...
Apple_PubSub_Socket_Render=/tmp/launch-pc2V6P/Render
...
What is this environment variable used for? Not really ...
1
vote
1answer
582 views
How to change bash version with homebrew
I have used homebrew to install the newest version of bash on my local system. I have added a symbolic link from: /usr/local/bin/bash to /usr/local/Cellar/bash/4.2.20/bin/bash and added the line: ...
1
vote
1answer
422 views
Run a Cocoa application on Lion as another user
I'm trying to run an application as the user 'steve' with the window displayed on my desktop ( brendan ).
This is what I have been doing so far.
sudo -u steve open -a /Path/To/MyApplication.app
...
2
votes
1answer
202 views
Add info to Dock/Menubar from Shell in macOSX
I'm working on MacOSX environnement, but I would like to tweak it a bit.
I have a few bash scripts I used in Linux to retrieve infos such as IP, average ping and so, that I would like to be displayed ...
5
votes
3answers
633 views
Updating modifier key mappings through defaults command tool
I am trying to automate the inital setup of my macbook, that includes installing software and changing OS X configuration to my needs.
I have tried to update the modifier keys with defaults, the ...
6
votes
1answer
3k views
How to enter special characters so that Bash/Terminal understands them?
Let's say a folder has a file called Näyttökuva.png (for those who are interested, it is ”screenshot” in Finnish). This is what happens:
$ ls
Näyttökuva.png
$ ls N*
Näyttökuva.png
$ ls Nä*
ls: Nä*: ...
