How to change profile to search current directory?
up vote
0
down vote
favorite
I would like to change my profile so that I can execute programs in the current directory without ./
.
In other words:
$ foo.sh
would accomplish what currently happens with:
$ ./foo.sh
command-line profile
add a comment |
up vote
0
down vote
favorite
I would like to change my profile so that I can execute programs in the current directory without ./
.
In other words:
$ foo.sh
would accomplish what currently happens with:
$ ./foo.sh
command-line profile
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I would like to change my profile so that I can execute programs in the current directory without ./
.
In other words:
$ foo.sh
would accomplish what currently happens with:
$ ./foo.sh
command-line profile
I would like to change my profile so that I can execute programs in the current directory without ./
.
In other words:
$ foo.sh
would accomplish what currently happens with:
$ ./foo.sh
command-line profile
command-line profile
edited Nov 24 at 20:31
Rui F Ribeiro
38.3k1475126
38.3k1475126
asked Jun 11 '11 at 10:13
Eric Wilson
1,89172439
1,89172439
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
up vote
4
down vote
accepted
This is generally considered a very dangerous idea because it introduces the possibility that you will be tricked into executing something thinking it is something else. Say for example that somebody puts an executable named "cd" in /tmp. Being able to run things in the current folder without specifying an explicit path might mean you inadvertently run that script (that could be malicious) as your user while expecting to just cd somewhere else on the system.
That being said you can affect this by adding ./
to your program execution path.
export PATH=$PATH:./
If you put that line in your ~/.profile
it should be available in any new shells you open.
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
4
down vote
accepted
This is generally considered a very dangerous idea because it introduces the possibility that you will be tricked into executing something thinking it is something else. Say for example that somebody puts an executable named "cd" in /tmp. Being able to run things in the current folder without specifying an explicit path might mean you inadvertently run that script (that could be malicious) as your user while expecting to just cd somewhere else on the system.
That being said you can affect this by adding ./
to your program execution path.
export PATH=$PATH:./
If you put that line in your ~/.profile
it should be available in any new shells you open.
add a comment |
up vote
4
down vote
accepted
This is generally considered a very dangerous idea because it introduces the possibility that you will be tricked into executing something thinking it is something else. Say for example that somebody puts an executable named "cd" in /tmp. Being able to run things in the current folder without specifying an explicit path might mean you inadvertently run that script (that could be malicious) as your user while expecting to just cd somewhere else on the system.
That being said you can affect this by adding ./
to your program execution path.
export PATH=$PATH:./
If you put that line in your ~/.profile
it should be available in any new shells you open.
add a comment |
up vote
4
down vote
accepted
up vote
4
down vote
accepted
This is generally considered a very dangerous idea because it introduces the possibility that you will be tricked into executing something thinking it is something else. Say for example that somebody puts an executable named "cd" in /tmp. Being able to run things in the current folder without specifying an explicit path might mean you inadvertently run that script (that could be malicious) as your user while expecting to just cd somewhere else on the system.
That being said you can affect this by adding ./
to your program execution path.
export PATH=$PATH:./
If you put that line in your ~/.profile
it should be available in any new shells you open.
This is generally considered a very dangerous idea because it introduces the possibility that you will be tricked into executing something thinking it is something else. Say for example that somebody puts an executable named "cd" in /tmp. Being able to run things in the current folder without specifying an explicit path might mean you inadvertently run that script (that could be malicious) as your user while expecting to just cd somewhere else on the system.
That being said you can affect this by adding ./
to your program execution path.
export PATH=$PATH:./
If you put that line in your ~/.profile
it should be available in any new shells you open.
answered Jun 11 '11 at 10:33
Caleb
50k9146190
50k9146190
add a comment |
add a comment |
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f14812%2fhow-to-change-profile-to-search-current-directory%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown