• Rob's side project: I recently started Gun-Forums.com and we currently have a $100 raffle - if you're into guns, join up and enter the raffle to win $100.00. Gun Forums

About commands for linux executable files

I

icyfight

Guest
I have seen commands like this: (hello is the executable file or maybe script file)
./hello
hello
.hello
So, anyone could tell me the differences among these commands?
 


G

garymetcalf

Guest
I have seen commands like this: (hello is the executable file or maybe script file)
./hello
hello
.hello
So, anyone could tell me the differences among these commands?
At a konsol or command line if you enter "ls -l" it will list the long listing of the files in the current dir. On the left side of the list it shows if the file is
r (read) w (writeable) and x (executable) A file will not run if it's not set with x. Actually there is a way around that but lets keep is simple here.
As far as the difference of: ./hello and hello the ./hello means to run the file in the current dir. hello is a file in the current dir but without :: in the path statement it won't execute without a path to it such as ./hello.

Now .hello means it won't show up in the listing without using the -a option. (it's hidden)

In my .bash_profile as the first line I set my current dir by
PATH="::$PATH" and that enables hello to run without a path to it. That makes your current dir a part of the path.
 


Members online


Latest posts

Top