|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
|
|
#1
|
||||
|
||||
|
Running an executable
Is there anyway to run an executable without typing the full path when you're actually in its directory? I'm new to the whole UNIX world. The closest I've been to it was DOS. Since both look the same I thought both would act the same (bad idea). In DOS, if you're in the executable is in the directory you are in, you can just type "file.exe" and it'll run the file. That doesn't seem to be the case in UNIX if the path to the current directory isn't in the PATH environment variable. It took me an hour to figure out how to edit $PATH just so I could run an executable because I couldn't run it any other way it seemed. I hadn't yet realized to just use the whole path. Anyway, my question. If I'm in a specific "bin" directory, how do I just run the executable? Thanks.
|
|
#2
|
||||
|
||||
|
A side comment: This is a feature, not a bug.
Say you were browsing around shared directories, and someone dropped a malicious program called "ls" in the shared directory- DOS would stupidly execute it, doing whatever negative things the cracker wanted. Just another way *nix is a far better server environment than win32. Anyway, assuming you want to execute a file in the current directory, you only have to make sure the file permissions are set correctly, and then prefix the filename with the current directory shortcut, ".". So, you'd do Code:
./file_to_execute.pl to execute a file in the directory you're currently in. This is a pretty basix *nix skill, you'd probably be well served to find and read a good basic *nix skills tutorial out there. . . . Oh, and try hitting the "tab" key as you type out a file or path name- *nix has file/path autocomplete built in (at least in bash. . .) |
|
#3
|
||||
|
||||
|
I never meant to make it seem that I thought it was a bug. I knew there was probably some reason. I have a UNIX book (that I haven't gotten all the way through), and I don't think it explained it. I might've just missed it. I've actually seen this notation lots of times, I just didn't know that's what it did. Thanks for the help and the TAB thing.
|
|
#4
|
|||
|
|||
|
There was an article posted on Newsforge friday regarding a tutorial for unix newbies.. I read through it and it seemed like a great primer.
Here is the link: URL - Bryan |
![]() |
| Viewing: Dev Shed Forums > Operating Systems > Linux Help > Running an executable |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|