106 Comments
- BaCk1a5h, on 10/12/2007, -13/+34Worst site color scheme EVER...
- shindig111, on 10/12/2007, -2/+12Very nice introduction. This is helpful to a lot of people. People usually don't think of windows as a command prompt kind of a OS.
Great find... - jokerr, on 10/12/2007, -2/+11True, nothing beats the *nix shell, however we're talking about windows here....
- grubs, on 10/12/2007, -4/+12"tar cvzf /user-`date +%F`.tar.gz /home/users
Feel free to use any archiving tool you want."
You mean something like this.
for /f "Tokens=1-4 Delims=/ " %i in ('date /t') do ntbackup.exe backup "c:documents and settings" /f c:user-%l-%j-%k /v:yes /m normal - nicholaides, on 10/12/2007, -6/+13"People usually don't think of windows as a command prompt kind of a OS. "
That's because the Windows command prompt blows. If you disagree, you need to spend time any unix-like shell. - mbm1980, on 10/12/2007, -0/+6This is more sexy:
ln -s /dev/hda1 ~/myfolder - EdLesMann, on 10/12/2007, -0/+6Ah yes, the windows powershell. Its about time ms updated because the command prompt really needed a good bashing....
*sorry couldnt help myself* - donatj, on 10/12/2007, -2/+7I use the command line all the time and I didn't know half this...
- mancat, on 10/12/2007, -0/+5And you have the option to install Services for Unix/Subsystem for Unix Applications, and then call Windows command line utilities within bash, csh, etc. scripts until your heart explodes.
http://microsoft.com/sfu - interiot, on 10/12/2007, -0/+5cmd.exe, she is a scary place. Anyway, my personal cheat sheet:
: -- (followed by a space), alternative for "rem", starts a comment
^ -- line continuation... like a backslash at the end of the line in unix
& -- command separator (cmd1& cmd2& cmd3), like ";" in unix
&& -- only execute the next statement if the last one succeeded, like unix/perl
|| -- only execute the next statement if the last one failed, like unix/perl - Termina, on 10/12/2007, -2/+7The "tools" you're given by default are years out of date, insecure, and are unable to do simple tasks.
Try generating a file using a .BAT file that includes the output of another file.
Please, find the DOS equivilent for this line:
tar cvzf /user-`date +%F`.tar.gz /home/users
Feel free to use any archiving tool you want. - ByteGuerilla, on 10/12/2007, -0/+5It's interesting to see what's changed since DOS 6.22. Back in the day (about 10 years ago maybe (I'm 19 now)) I used a couple of batch files to quickly navigate about my computer and back things up. A nine-year-old with things to back up? Yup... Colonisation savegames!
This was an inhereted 80286 without a functioning harddrive, eventually replaced with an 80386 with a hard drive (yay, no more booting Works from floppies). Of course, my Dad taught me how to do it, but it was invaluable and has helped me out a lot. My friends could never understand how I apparently "came from the days of DOS". - zopu, on 10/12/2007, -6/+10Or if you want a better windows command line:
http://www.cygwin.com/ - Haplo, on 10/12/2007, -0/+4"Simple things such as tab auto-completion are not even enabled by default "
Can't recall I had to hack the registry on my default install. - diecastbeatdown, on 10/12/2007, -2/+6really? i hated dos back in the day. well, it was a love/hate thing. always trying to increase that conventional ram for games. QEMM memory manager was the best though, stealth mode - forget about it! ;)
oh, and telemate was the best, then i discovered unix through war dialing and the rest was history. now i enjoy using linux/osx as it brings back those memories of commandline but in a more enjoyable manor.
oh, xtree gold rocked too.. hey you mentioned dos, now im on a tangent. ;P
the real windows shell will come soon enough, but it is just a knock-off from bash. - bradleyland, on 10/12/2007, -1/+5@rasterbator
Well, to be fair, you're comparing Window's equivalent of old school shell scripting to Automator and AppleScript, which are more similar to WSH and WMI than batch files.
Still, WSH/WMI lose badly to any offering on a machine with a *nix like userland. AppleScript and Automator are just salt on the wound.
On that same topic, I know a lot of Mac users, but hardly any of them use Automator, which is a shame. It seems that the same people who leverage automation on the Mac are the same people who would leverage automation on a PC... geeks. - gcauthon, on 10/12/2007, -0/+4From the article:
"Certain special features of the Run line such as opening folders or the Internet shortcuts discussed above do not work in a command prompt."
Excuse me? Never heard of the "start" command? The "start" command is the exact same as clicking the start button and typing something in to the "run" line. Open a command prompt and type "start /?" for help. Type "start folder/shortcut" and easily perform what the author just said was impossible. - Pimptastic, on 10/12/2007, -2/+5one of the worst web designs ive tried to read.
- jokerr, on 10/12/2007, -1/+4Call me a kill-joy, mod me down, whatever. The contents of this site are no better than doing a simple Google search. Also, since we're on the topic of Windows, the online MSDN library has everything that is found on this site....
- interiot, on 10/12/2007, -3/+6I completely agree that unix shells are far better than cmd.exe. On the other hand, the people at http://groups.google.com/group/alt.msdos.batch.nt have been able to get batch files to accomplish more things than you'd suspect. If you're feeling geeky and up for a challenge, try to figure out some of the stuff posted there (okay, more of a challenge and maybe less of the geeky, but anyway)
- rishid, on 10/12/2007, -3/+6Ya ok.. the site is sooo illegible it isn't even worth trying to read it.
- benr75, on 10/12/2007, -5/+8Seconded. In comparison to a *nix command line, windows is extremely painful. Simple things such as tab auto-completion are not even enabled by default and need to be turned on in the crappy registry.
- crahak, on 10/12/2007, -0/+3Somewhat useful... Knowing basic "DOS" commands can be useful for some simple things, but as you get into network admin and more complex tasks, it's clearly lacking.
That's where people get into other solutions, and there are PLENTY of them... :
-WSH or CSH (vbscript or jscript); often used along with WMI [Windows Media Instrumentation] to do things batch files couldn't ever dream of accomplishing (write to registry, get WMI info, read/insert/update data in a DB using SQL queries, read/write XML data, you name it). Not unusual to be used (applied) by means of GPO (or script that enumerates PCs from AD/Domain and remotely authenticates and does its work remotely). Others do similar things but in managed code (multithreaded C# works great for this IMHO)
-More advanced administration tools (like Automate, Hyena, etc), which can be handy but somewhat expensive (licensing).
-Using programming (not scripting) languages such as Perl... (a matter of preference, really)
-Various *nix-like utils ('nuff said)
Also, the windows 2k/XP/2k3 resource kits contain a LOT of very useful utilities (like CACLS.exe to set permissions and such)
But the newest/best thing going for admin [on windows] will soon be PowerShell (a.k.a. monad). There's a beta already available. - ericshawn, on 10/12/2007, -1/+4"I use Linux/Unix. I'm so l33t! You use Windows. You the stupid!"
How stimulating.
You guys are one step above the idiocy of the grammar Nazis. - MisterCookie, on 10/12/2007, -2/+5Did the site just get hit with the Digg effect? It went down pretty fast.....
- kremvax, on 10/12/2007, -1/+4Actually, if you install cygwin ( http://cygwin.com ) on your windows box, you can get at least a little bit of the power of a Unix shell, and avoid the little things that windows cli left broken. Pipes, grep, tab completion, proper cut and pasting, the whole enchilada of fun and goodness...
- ByteGuerilla, on 10/12/2007, -3/+5"Worst site color scheme EVER..."
It's not about the graphics, it's about the gameplay! - mcbesq, on 10/12/2007, -0/+2Nah, I dug it. I loved fiddling around with it. It really peaked with 5.0. 6 was garbage, 6.1 was worse and 6.2 only brought things back to where 5 was.
Now I have to get all Obi-Wan on you.
"QEMM. QEMM. That's a name I've not heard in a long time... a long time." Thanks for the stroll down memory (memory...hah!) lane.
Where's that Turbo button? I need to jack this box up to 33 mHz. - TheManiacKY, on 10/12/2007, -0/+2Another older command that I find handy is "subst". There are certain folders that I use over and over and I like to have ready access to them. One way to do this is to use the command subst to assign a drive letter to a folder. Since drives are at the top of My Computer and any folder trees in browse lists, it makes the folder very easy to get to. To map the Z: drive to a folder myfolder , entersubst z: myfolder
NOW THAT IS AWESOME! - geekThing, on 10/12/2007, -4/+6503 Service Temporarily Unavailable
Digg effect.
Somebody got a mirror? - interiot, on 10/12/2007, -0/+2mod that up! There are actually quite a few websites out there offering various .exes for unix-on-windows, but unxutils.sf.net is definitely one of the better ones.
- kupodan, on 10/12/2007, -0/+2Obviously the site was designed by someone using only command line and whom is opposed to any GUI at all. They must have been forced to make a graphical site and that is what they come up with.
- inkswamp, on 10/12/2007, -1/+3> Why do the *nix geeks have to chime in and spew this ***** every goddam time?
Because it's the truth.
I used to work on a Windows machine. I never knew what the big deal was with the command line in Windows. It seems like an anachronism and occasionally came in handy for very simple, repetetive tasks but little else. I switched to a Unix machine for my work. The command line and the tools available there are so rich, well integrated and constructed that it's like a whole new world hiding there. The things you can achieve with a few simple commands are amazing. I really don't know how I'd get by without it. - CypherXero, on 10/12/2007, -0/+2You can also use UnixUtils
http://unxutils.sourceforge.net/ - bhousel, on 10/12/2007, -0/+2I've done a lot of batch file programming recently, but I found that for more complicated tasks it's easier to just use vbscript. You can run any vbscript from the commandline or another batch file by using "cscript.exe" It's great for those out-of-the-box or locked down situations where you can't install a cygwin or perl..
- interiot, on 10/12/2007, -1/+3mooninite: To be fair, you *can* use cygwin tools (eg. grep, less, etc) from cmd.exe (eg. some tiny cygwin/sshd installs drop you into cmd.exe when you connect). But yes, cygwin users do primarily use ksh/tcsh.
- inactive, on 10/12/2007, -0/+2Maybe it'll work this time...
http://commandwindows.com.nyud.net:8080/ - spyrochaete, on 10/12/2007, -0/+2Code dump of uptime.bat which I keep on my desktop for giggles:
@echo off
c:windowssystem32systeminfo | find "Up Time"
pause
And yes, grep==find in WinXP - alai, on 10/12/2007, -1/+3The article: http://commandwindows.com.nyud.net:8090/
- solidcube, on 10/12/2007, -1/+3It's a command line. It runs under Windows.
It's not Cyg's fault that the native Windows command line is so 1981.
Cygwin is the only thing that makes Windows bearable at all. - ankit_shankar, on 10/12/2007, -0/+2Same thing happened to me. A page refresh lets you actually read the text.
- fino35, on 10/12/2007, -0/+1another mirror please?
- robjw, on 10/12/2007, -1/+2One word. Kixtart. The best windows scripting language ever. It's free and easy.
- grubs, on 10/12/2007, -0/+1ntfs has supported reparsepoints (ln -s /dev/hd?) since version 5 (windows 2000 ).
cmd line options are a pain since the volumes are described using their guid:
ln -s /dev/hda1 ~/myfolder
would be something like
mountvol %userprofile%myfolder \?Volume{29384bab-7a58-11d9-97d8-806d6172696f} - alai, on 10/12/2007, -0/+1This is a good introduction to command line usage, but unfortunately the only people that will read it are the people who don't need it.
- dizzley, on 10/12/2007, -0/+1Colour scheme fine from here (in Firefox). Did they fix it?
- h4ppydotcom, on 10/12/2007, -0/+1Oohh.... very nice. I just discovered symbolic links (got my first *nix web server recently and finally had to take the plunge and learn how to use a *nix command line). subst is a really nice stop-gap until I take the plunge and expel microsoft from my hardware :)
- deadbaby, on 10/12/2007, -0/+1Don't even bother learning this crap... the new Windows PowerShell is infinitely better.
- 1337geek, on 10/12/2007, -0/+1Service Temporarily Unavailable
The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later. - Termina, on 10/12/2007, -4/+5Bah, no one uses batch scripting anymore.
The lack of REAL piping is what made me switch out old .BAT files at work over to Perl. (That, and the fact that it takes 50 lines of batch scripting to equal 5 lines of Perl) -
Show 51 - 100 of 105 discussions



What is Digg?
Check out the new & improved