homeGeek CultureWebstoreeCards!Forums!Joy of Tech!AY2K!webcam

The Geek Culture Forums


Post New Topic  New Poll  Post A Reply
my profile | directory login | | search | faq | forum home
  next oldest topic   next newest topic
» The Geek Culture Forums   » Other Geeky Stuff   » Ask a Geek!   » dos prompt??

 - UBBFriend: Email this page to someone!    
Author Topic: dos prompt??
stevenback7
SuperBlabberMouth!
Member # 5114

Member Rated:
4
Icon 1 posted January 09, 2007 19:07      Profile for stevenback7   Author's Homepage     Send New Private Message       Edit/Delete Post   Reply With Quote 
Okay i'm one of those children who have been deprived from experiencing the start of the computer revolution. So in order to get in touch with my ancestors i've decided that i want to do something with dos/ command prompt. I know its there i know how you can reformat your computer by using it but thats about it. So i'm wondering if there is anything cool i can do with dos prompt without having to spend 10 years behind a computer which is worth the effort. and secondly do u guys know of any online tutorials on the subject i can print out and be able to understand late at night.


p.s. i didn't just read today the story on mr. gibsons website from 2001.

--------------------
Comic Book Guy: There is no emoticon for what i'm feeling.

Posts: 1199 | From: Canada eh? | Registered: May 2006  |  IP: Logged
GrumpySteen

Solid Nitrozanium SuperFan
Member # 170

Icon 1 posted January 09, 2007 19:18      Profile for GrumpySteen     Send New Private Message       Edit/Delete Post   Reply With Quote 
Assuming that you're using Windows, you can find a list of DOS commands and information that still applies under XP on this page.

Some of it is useful, some not so much. Some of it is on the XP CD and not even installed.

--------------------
Worst. Celibate. Ever.

Posts: 6364 | From: Tennessee | Registered: Jan 2000  |  IP: Logged
uilleann
Discontinued


Icon 1 posted January 09, 2007 19:45            Edit/Delete Post   Reply With Quote 
An executive summary: sort of.

There are various very useful programs that only ship as command-line tools, such as ipconfig, tracert and nslookup, although you can replace these with graphical equivalents. nslookup is a DNS lookup tool, tracert traces the route between your PC and a given remote host, and ipconfig tells your about your IP configuration and as ipconfig /flushdns, flushes your DNS cache if you have old entries in there that need removing.

A lot of this comes down to how you want to and need to use the PC. The Windows command interpreter sucks compared to UNIX in many ways but it has a few uses I guess.

Something to note is that most of your Windows apps are not and cannot be in your PATH unless the concept of PATH is redefined. Many apps -- all those that can be run from Start > Run -- can be run from the command line using the start command. E.g. this wil fail:

C:\>firefox
'firefox' is not recognized as an internal or external command,
operable program or batch file.

Typing "start firefox" will work. You may need to alter the Registry to allow extra programs to be started this way, though, including all those that did not use an installer, such as LAME binaries.

However, assuming Firefox is your default HTML file viewer, this is redundant:

start firefox somefile.html

Simply typing "somefile.html" will trigger cmd to look up the associated program and run it as though you selected the file in Explorer and pressed enter.

There is extremely limited ability to perform complex file operations via the command line, but it's so limited in power that mind-blowingly perverse stunts are required to achieve anything with it.

If you really want to use a command line as a dedicated tool, you'd have to install something like MinGW (Minimalist GNU for Windows) or Cygwin and use a UNIX shell in place of cmd.exe.

IP: Logged
dragonman97

SuperFan!
Member # 780

Member Rated:
4
Icon 1 posted January 09, 2007 21:14      Profile for dragonman97   Author's Homepage     Send New Private Message       Edit/Delete Post   Reply With Quote 
I'm partial to using unixkit-tiny on my servers, as it only needs to be extracted, and avoids all sorts of displeasure by others. I've put together a batch file to start it with, so my path is properly set. It is utterly invaluable for me.

On my own win32 box, I have the full Cygwin setup and use rxvt. *swoon*
rxvt and bash kicks cmd.exe's ass any day of the week. [Big Grin]

(Mind you, a proper Debian box is infinitely better, but that doesn't pay the bills, as said boxen tend not to fail much. [Wink] )

BTW...for a cute parlor trick, use doskey to alias commands. I used to keep a batch file on my Zip disk† which would open a command shell and run all my aliases. One handy one was:
doskey ls=dir $*

(Or at least, I really hope that's the right command, but I don't think my memory is that poor. Even though environment variables in DOS/win32 use %, I recall that doskey uses $ for arguments, and $* is 'all arguments.)

[†] Wow...I'm dating myself now‡ - that was back on a set of NT4 workstations...
[‡] Hey...no one else◊ will. [Wink]
[◊] (Perhaps the lady in red up north who would kill me in my sleep?) [Kidding!]

--------------------
There are three things you can be sure of in life: Death, taxes, and reading about fake illnesses online...

Posts: 9331 | From: Westchester County, New York | Registered: May 2001  |  IP: Logged
uilleann
Discontinued


Icon 1 posted January 09, 2007 22:23            Edit/Delete Post   Reply With Quote 
Yes, that is the correct doskey alias. I have that one set because I got tired of trying to type ls in cmd. I also need one for Linux that aliases dir to ls for when I type dir in Linux. Linux also refuses to recognise "rd" and "md" for "rmdir" and "mkdir" which is no fair! ;) What I wonder is if I write this:

alias ls="ls -F" # I think?
alias dir="ls"

bash will apply them recursively? I'd have to boot Linux to check.

Somewhere, I set cmd to automatically run "doskey ls=dir $*", which according to Autoruns is an image hijack. Any time that another program runs cmd, doskey crashes, which is a nuisance. cmd really needs a proper .cmdrc system and a way to tell it not to start doskey in non-interactive instances so that it doesn't keep falling over.

IP: Logged
dragonman97

SuperFan!
Member # 780

Member Rated:
4
Icon 1 posted January 09, 2007 22:41      Profile for dragonman97   Author's Homepage     Send New Private Message       Edit/Delete Post   Reply With Quote 
I think there's something called 'autoexec.nt' or something of the sort. This gizmo is supposed to be able to work like autoexec.bat and set the environment for future shells...but I'm not entirely sure it works out of box...or at all anymore. Hell...you might just want to research autoexec.bat as well. I gave up on fancy extensions to the win32 shell ages ago, and prefer to use my *nix savvy.

Yes, aliases in bash are recursive. Many people have ls aliased to something such as 'ls --color' and then have an ll aliased to 'ls -l' (that's an 'elle'), which will result in a color long list.

--------------------
There are three things you can be sure of in life: Death, taxes, and reading about fake illnesses online...

Posts: 9331 | From: Westchester County, New York | Registered: May 2001  |  IP: Logged
uilleann
Discontinued


Icon 1 posted January 09, 2007 22:56            Edit/Delete Post   Reply With Quote 
You were not satisfied to write "el" were you? It had to be "elle", probably while humming Lady in Red. But then, people like you probably get off on Tetris ;)

autoexec.nt BTW is for the NTVDM environment.

IP: Logged
dragonman97

SuperFan!
Member # 780

Member Rated:
4
Icon 1 posted January 09, 2007 23:15      Profile for dragonman97   Author's Homepage     Send New Private Message       Edit/Delete Post   Reply With Quote 
Well, 'el' is 'the' (m.) in Spanish, so that could be a little strange. Also, for sh*ts and giggles, I watched a certain daft movie this weekend via Netflix (and that had something to inspire the spelling, possibly). That was different.

/me gives a knowing stare off to the left coast... [Razz]


Also, let's not forget the Q. Tarantino character...and heck...she wouldn't dare let you forget.

--------------------
There are three things you can be sure of in life: Death, taxes, and reading about fake illnesses online...

Posts: 9331 | From: Westchester County, New York | Registered: May 2001  |  IP: Logged
Tominfla
Geek
Member # 6767

Member Rated:
5
Icon 1 posted January 10, 2007 00:35      Profile for Tominfla     Send New Private Message       Edit/Delete Post   Reply With Quote 
Autoexec.bat? Config.sys? Wow that's like what I used to do in Win 3.1 to try to get the darn thing to work right. [Geek]

I remember running DOS programs on what I think was an 8080 that had two 5-1/4" floppy drives and had so little memory that it could hardly run the preview in WordPerfect 5.1. It had a 10MB hard drive. Can you believe that? 10MB! [Beard of Peter Gabriel!]

I still run a few DOS programs on XP just for old times sake.

I know you folks have technology older than that, for sure. Any Amiga or Commodore 64/128 users out there?

Try Steen's suggestion of the Command Line Reference guide.

Or, this page which may be less confusing.

Let me know if you are running a legacy machine where you need to edit autoexec.bat or config.sys .

--Tominfla aka tamiflu or tominflo (details forthcoming in my introduction to be posted soon)

--------------------
"Go get that Earth creature and bring back the Uranium Pew36 Space Modulator" -- Marvin Martian

Posts: 245 | From: Orlando, Florida, USA | Registered: Jan 2007  |  IP: Logged
stevenback7
SuperBlabberMouth!
Member # 5114

Member Rated:
4
Icon 1 posted January 10, 2007 12:18      Profile for stevenback7   Author's Homepage     Send New Private Message       Edit/Delete Post   Reply With Quote 
Now what i can quickly make out of your posts (i don't have a lot of time because its that wonderfull time of the year again were exams are coming up). that dos isn't really worth doing anything with, so i think i might attempt to try and put linux on this ancient laptop and see if that works.

So now the question is what is the best version of linux to run on a laptop with about a 4 gig hard drive and a pentium 2 proccesor? And what are some good things to do with linux ?

--------------------
Comic Book Guy: There is no emoticon for what i'm feeling.

Posts: 1199 | From: Canada eh? | Registered: May 2006  |  IP: Logged
nerdwithnofriends
Uber Geek
Member # 3773

Icon 1 posted January 10, 2007 12:55      Profile for nerdwithnofriends     Send New Private Message       Edit/Delete Post   Reply With Quote 
I'd say put debian on there, sans X11 (or X.org or whatever it is these days)

4 gigs is more than enough to get all your compilers and other tools on there, and a PII processor will work for most tasks.

I'd say try and make it into a music server. I've heard it can be done and it sounds like a cool idea, like a hacker's version of the airport express. I don't know how you'd do it, but I'm sure there's some software on sourceforge built for that exact purpose.

The best way to learn how to swim is to jump right in.

--------------------
"The Buddha, the Godhead, resides quite as comfortably in the circuits of a digital computer or the gears of a cycle transmission as he does at the top of a mountain or in the petals of a flower." - Robert M. Pirsig

Posts: 948 | Registered: Mar 2005  |  IP: Logged
uilleann
Discontinued


Icon 1 posted January 10, 2007 13:00            Edit/Delete Post   Reply With Quote 
There is some surprising bollocks out there. From one of the links in Tom's post:

quote:

While MS-DOS is not commonly used by itself today, it still can be accessed from every version of Microsoft Windows by clicking Start / Run and typing "command" or by typing "CMD" in Windows NT, Windows 2000 or Windows XP.

The Windows NT command interpreter (cmd.exe) is not MS-DOS. It is not a DOS prompt. It is nothing to do with DOS. MS-DOS is a computer operating system. The Windows NT series (NT 3, 4, 2k, XP, Vista) is a complete replacement for the MS-DOS-based series of operating systems. They do ship with a special DOS environment, the NT Virtual DOS Machine (NTVDM) and the Windows-on-Windows Execution Environment (for Windows 3 emulation) but this is distinct from the command interpreter, which is nothing more than a command line shell running inside the Windows NT console environment.

Not just that, but the NT command interpreter and console service is very different to DOS. The commmands that service NT shell script (command files, or batch files) are now greatly enhanced and the language itself has many notable improvements, although it's still a pain in the ass and buggy. Type cmd /? for help, and you can ask for help on many other built-ins such as shift /? (you'll note that both are far more extensive than COMMAND.COM offered in MS-DOS 6).

dir supports long names, cmd supports tab completion and intelligent completion cycling in a way I've yet to see UNIX offer (pressing tab in cmd cycles through all possible matches, whereas bash, by default, beeps rudely and then dumps a list of matches if you keep hitting tab until it obeys)...

You can run DOS programs from cmd, and it goes into compatibility mode to do so: the prompt shows the current path in 8.3-naming mode, which is hard to get out of. The DOS and Windows 3 apps themselves don't run independently: they all live inside the NTVDM host process as virtual tasks. Task Manager shows these sub-processes but Process Explorer does not; only ntvdm.exe is listed.

cmd.exe is not MS-DOS.

IP: Logged
stevenback7
SuperBlabberMouth!
Member # 5114

Member Rated:
4
Icon 1 posted January 10, 2007 17:44      Profile for stevenback7   Author's Homepage     Send New Private Message       Edit/Delete Post   Reply With Quote 
uilleann _____________ i expected nothing more then a boring lecture from you. Didn't get past the first sentance before the groaning started (no sexual implications intended)

--------------------
Comic Book Guy: There is no emoticon for what i'm feeling.

Posts: 1199 | From: Canada eh? | Registered: May 2006  |  IP: Logged
CommanderShroom
BlabberMouth, a Blabber Odyssey
Member # 2097

Member Rated:
4
Icon 1 posted January 10, 2007 17:56      Profile for CommanderShroom     Send New Private Message       Edit/Delete Post   Reply With Quote 
I find uilleans post quite interesting.

Many times he has some very good information that I try and sock away for later use.

But then again, I don't look at the world quite the same as others either. But perhaps you should give a second, close look at what he is saying. Because he is trying to clarify a true misconception about the command prompt in newer (read: Most versions in use) of Windows. If you build knowledge on a shitty foundation, you will hit the wall faster.

--------------------
Does he know our big secret?
Has one of us confessed?
'Bout the wires circuits and motors
Buried in our chest

Posts: 2463 | From: Utarrrrggggghhh!!!!!!!! | Registered: Mar 2003  |  IP: Logged
dragonman97

SuperFan!
Member # 780

Member Rated:
4
Icon 1 posted January 10, 2007 18:34      Profile for dragonman97   Author's Homepage     Send New Private Message       Edit/Delete Post   Reply With Quote 
quote:
Originally posted by stevenback7:
uilleann _____________ i expected nothing more then a boring lecture from you. Didn't get past the first sentance before the groaning started (no sexual implications intended)

Actually, you expected nothing *less* /than/ a boring lecture from uilleann. [Wink]

--------------------
There are three things you can be sure of in life: Death, taxes, and reading about fake illnesses online...

Posts: 9331 | From: Westchester County, New York | Registered: May 2001  |  IP: Logged
uilleann
Discontinued


Icon 1 posted January 10, 2007 18:59            Edit/Delete Post   Reply With Quote 
OK, so tell me what the fuck this means?
quote:
stevenback7
"Okay i'm one of those children who have been deprived from experiencing the start of the computer revolution. So in order to get in touch with my ancestors i've decided that i want to do something with dos/ command prompt

Tell me where this implies "Hey, I wish to remain as clueless after I started as I am already"?
IP: Logged
drunkennewfiemidget
BlabberMouth, a Blabber Odyssey
Member # 2814

Member Rated:
4
Icon 1 posted January 10, 2007 19:06      Profile for drunkennewfiemidget     Send New Private Message       Edit/Delete Post   Reply With Quote 
Why don't you learn something new that'll actually be of some use to you? Surely knowing dos commands won't help you with much nowadays.

Try Unix or Linux of some sort instead.

Posts: 4897 | From: Cambridge, ON, Canada | Registered: Jun 2004  |  IP: Logged
CommanderShroom
BlabberMouth, a Blabber Odyssey
Member # 2097

Member Rated:
4
Icon 1 posted January 10, 2007 19:46      Profile for CommanderShroom     Send New Private Message       Edit/Delete Post   Reply With Quote 
Come one newf, DOS is like the handicapable red-headed stepchild of *nix. [Wink]

And once someone truly experiences the horrors of DOS, it is much easier to show them something with real ability.

--------------------
Does he know our big secret?
Has one of us confessed?
'Bout the wires circuits and motors
Buried in our chest

Posts: 2463 | From: Utarrrrggggghhh!!!!!!!! | Registered: Mar 2003  |  IP: Logged
uilleann
Discontinued


Icon 1 posted January 10, 2007 20:07            Edit/Delete Post   Reply With Quote 
If you want the real horrors of DOS, i.e. without all the schmancy features of cmd, then install DOSbox and try to do anything useful with it. Welcome to owning a DOS PC [Razz]

(Annoyingly, I can't boot Win 3.11 inside of DOSbox, it locks up at the boot screen...)

IP: Logged
csk

Member # 1941

Member Rated:
5
Icon 1 posted January 10, 2007 20:42      Profile for csk     Send New Private Message       Edit/Delete Post   Reply With Quote 
quote:
Originally posted by uilleann:
If you want the real horrors of DOS, i.e. without all the schmancy features of cmd, then install DOSbox and try to do anything useful with it. Welcome to owning a DOS PC [Razz]

Does that really simulate everything? Including the tortures of fiddling with autoexec.bat and config.sys to get just the right combinations of normal, extended, and expanded RAM for whichever game you were trying to play to run? Those were the days .. Syndicate was so worth it though...

--------------------
6 weeks to go!

Posts: 4455 | From: Sydney, Australia | Registered: Jan 2003  |  IP: Logged
dragonman97

SuperFan!
Member # 780

Member Rated:
4
Icon 1 posted January 10, 2007 20:50      Profile for dragonman97   Author's Homepage     Send New Private Message       Edit/Delete Post   Reply With Quote 
csk: Want something really painful? I've been making such tweaks myself...lately. Oh, the joys of trying to make certain boot floppies!

Thankfully, I've found a way that's largely better, but it's certainly not unfamiliar territory to me - unfortunately.

--------------------
There are three things you can be sure of in life: Death, taxes, and reading about fake illnesses online...

Posts: 9331 | From: Westchester County, New York | Registered: May 2001  |  IP: Logged
Tominfla
Geek
Member # 6767

Member Rated:
5
Icon 1 posted January 10, 2007 20:54      Profile for Tominfla     Send New Private Message       Edit/Delete Post   Reply With Quote 
Do you know if Windows 3.1 (vs. 3.11) will work in DOSbox?

--------------------
"Go get that Earth creature and bring back the Uranium Pew36 Space Modulator" -- Marvin Martian

Posts: 245 | From: Orlando, Florida, USA | Registered: Jan 2007  |  IP: Logged
uilleann
Discontinued


Icon 1 posted January 10, 2007 21:05            Edit/Delete Post   Reply With Quote 
csk: Pass. My real point was more the idea that you get a prompt come up and just stare at you. You've got to try to figure out what to do with it, it's a guessing game. At least it has command history built into it shell, whereas real DOS required DOSKEY be installed for that first. But sorry, I forgot, DOSbox runs it own command interpreter and COMMAND.COM won't start.

In all truth, you're best off with something like VMware and a stack of MS-DOS discs ;) This way, you get real DOS, a proper virtualiser (DOSbox is an emulator and is extremely slow) at a probable cost of things like OPL and GUS emulation. (SB wave emulation is not necessary, but OPL emulation is.)

DOSbox has various problems, since there are more things it won't run than Windows 3.11 -- other games also get a blank screen and lock up, including Lemmings. So if you can resolve why it freezes, Windows should run too. And in doing so, you're getting as much fun out of DOSbox as getting a real DOS PC and wondering why nothing works ;) Different set of problems but still the same old "for crying out loud why doesn't this work?"

Actually DOS was quite good to me. And with some well-designed sound card drivers and the use of QEMM, I had all 640 k conventional memory free! Wooo!

IP: Logged
Jace Raven

Solid Nitrozanium SuperFan!
Member # 2444

Icon 1 posted January 10, 2007 21:37      Profile for Jace Raven         Edit/Delete Post   Reply With Quote 
The two best command line tools:

replmon - which is a support/adminpak tool

and

/?

Posts: 1791 | Registered: Nov 2003  |  IP: Logged
uilleann
Discontinued


Icon 1 posted January 10, 2007 21:47            Edit/Delete Post   Reply With Quote 
C:\Documents and Settings\Dan>/?
'/?' is not recognized as an internal or external command,
operable program or batch file.


For what it's worth, the command you were looking for is "help" which provides a summary of every built-in command in NT and one or two extra tools like chkdsk. (help in MS-DOS was a proper interactive help viewer rather like the Windows Help program) It also accesses the long help ("/?") for all these commands.

Getting help directly from commands is not straightforward. MS tools tend to respond to "/?" quite well, e.g. "dir /?" (AKA "help dir") but third-party commands frequently use the UNIX style of "-?", for example:

code:
C:\Documents and Settings\Dan>optipng /?
OptiPNG 0.5.4: Advanced PNG optimizer.
Copyright (C) 2001-2006 Cosmin Truta.

** Processing: /?

Error: Can't open the input file

1 error(s) encountered.

vs
code:
C:\Documents and Settings\Dan>optipng -?
OptiPNG 0.5.4: Advanced PNG optimizer.
Copyright (C) 2001-2006 Cosmin Truta.

Usage:
optipng [options] files ...
Files:
Image files of type: PNG, BMP, GIF, PNM or TIFF
Basic options:
-h, -help show this help
...

Notice that even "-?" is not what it tells you to use. "-help" is technically wrong, as full-word args in UNIX-style environments should be preceded with a double-dash, as in "--help" but no-one can agree on that one either.
IP: Logged


All times are Eastern Time  
Post New Topic  New Poll  Post A Reply Close Topic    Move Topic    Delete Topic next oldest topic   next newest topic
 - Printer-friendly view of this topic
Hop To:

Contact Us | Geek Culture Home Page

2015 Geek Culture

Powered by Infopop Corporation
UBB.classicTM 6.4.0



homeGeek CultureWebstoreeCards!Forums!Joy of Tech!AY2K!webcam