Udostępnij za pośrednictwem


pushd - autofs on Windows that i never knew about and other ramblings

It had been on my blog todo list for awhile, but Buck beat me to it :)

pushd works nicely for creating that mapping for you that's nice and trasient - when you popd, it goes away.  This makes it excellent not only for interactive use, but incredible for scripts when you need to deal with network shares, especially when scripting programs that don't deal with UNC paths nicely.

For not needing to define the network paths you need to use ahead of time, it has some advantages over autofs (at least the last time I used autofs).  The pushd/popd gets to define mapping lifetime nicely, so I like the “using statement” feel to it :)

On a semi-related note, there's a lot of commands that take UNC paths that you never really realized.  For me, of all things, copy was one of them :)

C:\temp>copy \\vsnc\users\jmanning\buildc.err .
        1 file(s) copied.

On a more unrelated note, I've been a Cygwin user for what seems like forever.  After all, you can do wacky things like XDMCP into the unix box and other fun stuff.  Lots of programs available in the install.

While the default install doesn't have nearly as many options, I've been playing with SFU recently since I heard about the SFU tool warehouse.  The targets of the two aren't quite the same (SFU can do things like clustered NFS and is more focused on interoperation, Cygwin is more running unix-world programs on a compatibility library), but they're pretty similar from a command-line experience point of view.

Much like with vi/emacs, kde/gnome, windows/linux/osx, competition is good, and I look forward to SFU and Cygwin driving each other to make the lives of unix users better in the Windows world :)