path - executing in current directory vs specifying executable linux -



path - executing in current directory vs specifying executable linux -

i sure hope gets great laugh @ me...a lowly windows boy. don't know how post question (let lone google solution). here confusion:

i using virtualbox trusty64 os installed. type:

$ cd /home/vagrant/.rbenv/versions/2.1.3/bin

$ ls

bundle bundler erb erubis ...

$ bundler -v

: no such file or directory

$ /home/vagrant/.rbenv/versions/2.1.3/bin/bundler -v

bundler version 1.7.3

$

honestly, i'm new linux evident. aren't these 2 equivalent? if i'm in directory , execute "bundler -v" should not same result when explicitly type current path , executable like: "/home/vagrant/.rbenv/versions/2.1.3/bin/bundler -v"?

to run binary scheme knows because in $path variable can utilize name of programme , parameters, example:

bundle -v

if programme not in $path , want execute in current working directory, run:

cd /path/to/file/directory ./programname

or alternatively utilize absolute path, example: /home/vagrant/.rbenv/versions/2.1.3/bin/bundler -v

to find directories containing programs scheme knows about, run echo $path in shell.

take here: http://askubuntu.com/questions/164180/different-ways-of-executing-binaries-and-scripts

linux path

Comments

Popular posts from this blog

Delphi change the assembly code of a running process -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -

C++ 11 "class" keyword -