Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Just installed bash dropbox-upload on my raspberry Pi with a debian distro. Right now I have to be in my root/src/Dropbox-Upload/ catalog to run ./dropbox-upload.sh command.

How can I make ./dropbox-upload.sh run from anywhere?

I saw something like Add: export PATH=$PATH:/new/path

But I'm really a newbie on linux and scripting. Where and how should I add it?

Kind regards

share|improve this question

migrated from stackoverflow.com Sep 27 '12 at 23:38

This question came from our site for professional and enthusiast programmers.

2 Answers 2

In your home directory there should be a file like .profile / .bash_profile / .bashrc If one of these files is present, open them and see if there is a line already defining your PATH. If so, you could append the folder containing the dropbox upload shell script. If not, create a new line for PATH.

More info on path cam be found here: http://www.codecoffee.com/tipsforlinux/articles/11.html

share|improve this answer

Instead of messing with your PATH you could simply move it to /usr/local/bin (assuming this directory exists and is already on the default PATH, and assuming the script is self-contained, i.e. doesn't also need to have libraries or data files installed).

The prefix ./ is used to refer to the current directory; you should omit that part to make the shell use your PATH for locating the script or executable.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.