Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Systems and Services > OS X

Reply
 
Thread Tools Search this Thread Display Modes
Old Sep 26, 2008, 04:23 AM   #1
Thrash911
macrumors 6502
 
Join Date: Sep 2006
Location: Northern Jutland, Denmark
Where do I put new Terminal commands?

I downloaded a new command to use in the terminal. I don't know where to put this.. Even if the command is at the same path the terminal is, it still can't find it.

Where do I put it? And will the os need to "register" the command or something?
__________________
Kindly - Brian J. Nielsen
27" iMac, 3.4GHz i7, GTX 680MX 2Gb, 1TB Fusion, 16Gb
PC 3.2GHz i7, GTX 580 3Gb, SSD, 2.5Tb, 12Gb

Phone HTC One 32Gb (silver)
Thrash911 is offline   0 Reply With Quote
Old Sep 26, 2008, 04:46 AM   #2
fpbecker
macrumors member
 
Join Date: Sep 2008
Location: Frankfurt, Germany
Send a message via ICQ to fpbecker Send a message via MSN to fpbecker Send a message via Yahoo to fpbecker Send a message via Skype™ to fpbecker
Could you be a little more specific please?

What command did you download, and in which form did you download it - as disk image or as .pkg file?
__________________
20" Aluminium iMac 2.0 GHz, 4 GB RAM, 250 GB HD; 2nd generation iPod Touch 16 GB
fpbecker is offline   0 Reply With Quote
Old Sep 26, 2008, 04:51 AM   #3
Thrash911
Thread Starter
macrumors 6502
 
Join Date: Sep 2006
Location: Northern Jutland, Denmark
It's just a raw unix executable. It's "ipodpatcher" from here:

http://www.rockbox.org/twiki/bin/view/Main/IpodPatcher

I can double-click on it, and it executes in the terminal. But I have to use this command with some other parameters.. Is there a specific folder where I can put this, so the Terminal can always find it?
__________________
Kindly - Brian J. Nielsen
27" iMac, 3.4GHz i7, GTX 680MX 2Gb, 1TB Fusion, 16Gb
PC 3.2GHz i7, GTX 580 3Gb, SSD, 2.5Tb, 12Gb

Phone HTC One 32Gb (silver)
Thrash911 is offline   0 Reply With Quote
Old Sep 26, 2008, 06:42 AM   #4
isx
macrumors member
 
Join Date: Sep 2008
use terminal to navigate (cd) to the folder containing the app. Then type the app name and any other switches you need to use. Should work fine.


Quote:
Originally Posted by Thrash911 View Post
It's just a raw unix executable. It's "ipodpatcher" from here:

http://www.rockbox.org/twiki/bin/view/Main/IpodPatcher

I can double-click on it, and it executes in the terminal. But I have to use this command with some other parameters.. Is there a specific folder where I can put this, so the Terminal can always find it?
isx is offline   0 Reply With Quote
Old Sep 26, 2008, 07:57 AM   #5
itickings
macrumors 6502a
 
itickings's Avatar
 
Join Date: Apr 2007
Quote:
Originally Posted by isx View Post
use terminal to navigate (cd) to the folder containing the app. Then type the app name and any other switches you need to use. Should work fine.
Depending on the setup, you may have to prefix the command with its path to make the terminal look in the right place.

Code:
cd /path/to/application
./command [parameters]
or
Code:
/path/to/application/command [parameters]
Edit: Regarding the OP's question, the command can be put anywhere. It will still be accessible if the place you put it in has been added to the PATH which tells the Terminal where to look for commands. OS X: Change your PATH environment variable

Last edited by itickings; Sep 26, 2008 at 08:26 AM.
itickings is offline   0 Reply With Quote
Old Sep 26, 2008, 09:33 AM   #6
purplelizzard
macrumors newbie
 
Join Date: Feb 2007
If you will use the command a lot, you can copy it to you /usr/bin/ or /usr/sbin/ folder. Then you can run it just by typing in 'ipodpatcher' regardless of what directory you are in. You can copy it like this:
Code:
cp /path/to/ipodpatcher /usr/bin/ipodpatcher
chmod 4755 /usr/bin/ipodpatcher
The first line copies your binary to the /usr/bin/ folder and the second one changes the permissions of the file you just copied so it can be executed. I can't remember if either of those commands requires root permissions, but if you get an error about permission being denied, just prefix each of those lines above with 'sudo' and type in an administrator password when prompted.
__________________
13" MacBook (White)
8 GB iPod Touch
purplelizzard is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > OS X

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
General: FIX "Error opening terminal: xterm-256color" for Terminal Commands (e.g., "top") iOS7 thelatinist Jailbreaks and iOS Hacks 9 Jan 10, 2014 07:46 PM
Terminal commands dhokes OS X 6 Oct 21, 2013 10:24 AM
Terminal Commands: Networking related commands? MacNoobGuy OS X 3 Oct 27, 2012 09:10 AM
Almost no commands are working in terminal signor.dictator Mac Programming 4 Jun 14, 2012 03:14 PM

Forum Jump

All times are GMT -5. The time now is 01:21 PM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC