IWETHEY v. 0.3.0 | TODO
1,095 registered users | 0 active users | 0 LpH | Statistics
Login | Create New User
IWETHEY Banner

Welcome to IWETHEY!

New Re: It still seems strange to me.
Let's see:
.. means the parent directory
. means the current directory
./ seems to mean the current directory as well (at least on Win2k).

That's all correct.
What am I missing? How is "./filename.exe" different from "filename.exe"?
See the title for [link|/forums/render/content/show?contentid=195567|this post] for the explanation. Peter's already said what's wrong with it.
-YendorMike

"They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety."
- Benjamin Franklin, 1759 Historical Review of Pennsylvania
New Yeah, but why does it matter?
Sorry if I'm seeming dense.

On Winders, I can put an executable anywhere. I can open a folder view on the desktop of that directory, double-click on the icon for the executable, and it'll run. Similarly, I can open a command prompt window and run it there if I'm in the directory where the executable is. It doesn't matter if the directory is on the path or not. It worked the same way on OS/2 and DOS as far as I recall. The command interpreter seems to always start in the current directory even if it's not specified in the path. Thus, the path was only necessary if you didn't start the executable from the current directory.

Why is it different on BSD/Unix/OSX? Does the command interpreter not automatically look for executables in the current directory first? Does the ./ tell the command interpreter to look in the current directory because it won't otherwise? <lightbulb>

Thanks.

Cheers,
Scott.
New AFAIK the path always matters
But everyone always stuck . in the path, so you could always run programs in the current directory.

However on Unix they got tired of people finding exploits based on putting an executable under a likely name in a directory where it would be called. So many of them took . out of the path.

Cheers,
Ben
I have come to believe that idealism without discipline is a quick road to disaster, while discipline without idealism is pointless. -- Aaron Ward (my brother)
New DOS/Windows always looked in the current directory.
Regardless of the PATH setting.

Wade.

Is it enough to love
Is it enough to breathe
Somebody rip my heart out
And leave me here to bleed
 
Is it enough to die
Somebody save my life
I'd rather be Anything but Ordinary
Please

-- "Anything but Ordinary" by Avril Lavigne.

New Ick. I always had it in the path so never realized.
I have come to believe that idealism without discipline is a quick road to disaster, while discipline without idealism is pointless. -- Aaron Ward (my brother)
New common sense for non nix users
say you write a nifty program for remote access in your home directory and name it rm for short then exec it with the flag r for ron and * to remote access for all. Problem is that /usr/bin is in the front of your path so the shell will pick up the remove every file you see command instead. By explicitly requiring you to invoke the current directory for a file it indicates that you are aware of where you are in the heirarchy.
regards,
daemon
"I am not scared of al Qaeda, I am scared of fucking al Cracker sayeth Chris Rock
New Danke. Thanks to you too Ben. I appreciate it.
New Consistency, the hobgoblin of little minds - and Unix... :-)
The Other Scott excuses hisself:
Sorry if I'm seeming dense.
Hey, better you than me! ;-) (For once.)


Why is it different on BSD/Unix/OSX? Does the command interpreter not automatically look for executables in the current directory first? Does the ./ tell the command interpreter to look in the current directory because it won't otherwise? <lightbulb>
Ed Zachary.

Iff'n yer gonna HAVE a concept of "search path" that's supposed to tell ya where to run apps from (unless you explicitly SAY where they're at), then the consistent and logical thing to do would be to ONLY run apps from directories in the search path (unless, etc).

So, no surprise, that's what *nix does.

The way DOS/Winders (and, if you say so, OS/2) do it -- i.e, searching the current directory, whether it's in the path or not -- can be seen in two slightly different ways, albeit with the same end result: Either it *also* always searches the current directory, in *addition* to the path; or, you could say, in these OSes the path *implicitly* always *includes* the current directory.

Looking at it the first way it's inconsistent, going against the most basic definition of "search path"; the second, it's typical MS-OS sleight-of-hand based on not-explicitly-stated behind-the-scenes machinations.

Either way, consistent and logical it actually ain't -- *easy*, perhaps, but when you think about it, neither as consistent nor as logical as the *nix way.

</lightbulb>


   [link|mailto:MyUserId@MyISP.CountryCode|Christian R. Conrad]
(I live in Finland, and my e-mail in-box is at the Saunalahti company.)
Your lies are of Microsoftian Scale and boring to boot. Your 'depression' may be the closest you ever come to recognizing truth: you have no 'inferiority complex', you are inferior - and something inside you recognizes this. - [link|http://z.iwethey.org/forums/render/content/show?contentid=71575|Ashton Brown]
     Einstein@home - (pwhysall) - (68)
         Well, ya guys might as well . . - (Andrew Grygus)
         OK, I've got a Dual 2GHz G5 here... - (Another Scott) - (21)
             gzip -dv $FILENAME - (pwhysall) - (19)
                 Didn't seem to make any difference. :-( - (Another Scott) - (18)
                     It's just the executable right there - (pwhysall) - (17)
                         I did. Multiple times. - (Another Scott) - (16)
                             Run it from the terminal. -NT - (pwhysall) - (3)
                                 command not found - (Another Scott) - (2)
                                     Current directory is not in the path. - (pwhysall) - (1)
                                         Thanks. Woo and Yay are called for! -NT - (Another Scott)
                             the OS thinks its a doc? - (daemon) - (11)
                                 That worked?!? - (Another Scott) - (10)
                                     It means ".\\" ; HTH! (What, you don't remember MS/PC-DOS?) -NT - (CRConrad) - (9)
                                         It still seems strange to me. - (Another Scott) - (8)
                                             Re: It still seems strange to me. - (Yendor) - (7)
                                                 Yeah, but why does it matter? - (Another Scott) - (6)
                                                     AFAIK the path always matters - (ben_tilly) - (2)
                                                         DOS/Windows always looked in the current directory. - (static) - (1)
                                                             Ick. I always had it in the path so never realized. -NT - (ben_tilly)
                                                     common sense for non nix users - (daemon) - (1)
                                                         Danke. Thanks to you too Ben. I appreciate it. -NT - (Another Scott)
                                                     Consistency, the hobgoblin of little minds - and Unix... :-) - (CRConrad)
             More E@H on OS X tips in the Macintosh forum. - (Another Scott)
         IWETHEY has now hit the dizzying heights of rank #494... -NT - (Meerkat) - (7)
             It's awfully slow in officially granting credits, isn't it? - (Another Scott) - (3)
                 Not just me, then :-) - (pwhysall) - (2)
                     It's not the screamer I was expecting it to be. - (Another Scott) - (1)
                         Re: It's not the screamer I was expecting it to be. - (pwhysall)
             You seem to have the ubermachine on the team. But SMP helps. - (Another Scott) - (2)
                 Keeps stalling on me - (drewk)
                 Will look up the machine details when I get home. - (Meerkat)
         So does this fight with SETI@home for cycles? -NT - (Silverlock) - (1)
             It can, if you set it up that way. - (Another Scott)
         Woo and Yay! We're #466 in total credits (431.70). - (Another Scott) - (4)
             Sorry, not happening. -NT - (broomberg) - (3)
                 SAYS WHO? - (folkert) - (1)
                     :-) -NT - (Another Scott)
                 Thought so; doesn't hurt to ask. ;-) -NT - (Another Scott)
         But... There is no gravity. - (imric)
         IWETHEY is team #367 now - 1196.13 cr. We're on the move... - (Another Scott) - (4)
             I have 700 credits pending! -NT - (pwhysall) - (3)
                 Muah! - (Another Scott) - (2)
                     Why am I showing two machines? - (drewk) - (1)
                         A FAQs addresses the Credits issue. - (Another Scott)
         I'm *so* pending. - (pwhysall) - (6)
             Yeah what's with that? - (Meerkat) - (5)
                 And why isn't mine processing any more? - (drewk) - (4)
                     There's nothing in the Messages saying why it has stopped? - (Meerkat) - (1)
                         Says it suspended one and started another - (drewk)
                     As I read your stats... - (Another Scott) - (1)
                         Each time I've started, it worked while I did - (drewk)
         We're #306 now, at least as high as #302 earlier today. - (Another Scott) - (8)
             If it weren't for pending results... - (Meerkat) - (1)
                 I'd like to think that... - (Another Scott)
             6th would be me - (Steven A S) - (1)
                 Woo and Yay! :-) -NT - (Another Scott)
             Tip I found while researching my problem - (drewk) - (3)
                 ! - (Another Scott) - (1)
                     Ooh, must try -NT - (drewk)
                 Just use the Boinc clients from... - (folkert)
         Some interesting teams out there. - (Another Scott) - (3)
             I wonder if somebody is naked and famous? -NT - (inthane-chan) - (2)
                 ICLRPD - (Steve Lowe) - (1)
                     It's a Presidents of the United States of America song... - (inthane-chan)
         Finally got some data - (SpiceWare)
         Woo and Yay! We're #200! - (Another Scott) - (2)
             I'm one of the 2 - (Steve Lowe) - (1)
                 Neat! We'll soon take Estonia! :-) -NT - (Another Scott)

Well, from then on, we had a whale of a time. I took her to dinner, I took her to dance. I bought her a bouquet of flounders. And then I went home with her. And what did I get for my trouble? A case of the clams.
185 ms