Wow, DOS!

ScottyB

Diamond Member
Jan 28, 2002
6,677
1
0
Wow, I didn't know you can use unix commands in DOS. I will be using DOS a lot more now. :)
 

Skyclad1uhm1

Lifer
Aug 10, 2001
11,383
87
91
C:\>ps
'ps' is not recognized as an internal or external command,
operable program or batch file.

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

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

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

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

notfred

Lifer
Feb 12, 2001
38,241
4
0


<< Wow, I didn't know you can use unix commands in DOS. I will be using DOS a lot more now. :) >>



no you can't. What command are you refferring to?

ls doesn't work, rm doesn't work, mkdir doesn't work, filename completion doesn't work....
 

bunker

Lifer
Apr 23, 2001
10,572
0
71


<<

<< Wow, I didn't know you can use unix commands in DOS. I will be using DOS a lot more now. :) >>



no you can't. What command are you refferring to?

ls doesn't work, rm doesn't work, mkdir doesn't work, filename completion doesn't work....
>>


Umm...that's always worked in DOS.
 

Descartes

Lifer
Oct 10, 1999
13,968
2
0


<< ls doesn't work, rm doesn't work, mkdir doesn't work, filename completion doesn't work.... >>



Most of those could be created using a simple batch file. What form of filename completion are you referring to? I use the wildcard form all the time...

cd prog*\some*\fold*\etc

There are several unix utilities I actually ported myself (some in C, some in C#) because I use them all the time (grep, wc, tr, sort, uniq, etc.).
 

ScottyB

Diamond Member
Jan 28, 2002
6,677
1
0
ls works, cd works, copy instead of cp, time works, DEL instead of rm. Can't find the one to make a new directory but I did it the other day.
 

BigJohnKC

Platinum Member
Aug 15, 2001
2,448
1
0
I heard that filename completion almost works in XP's dos version. Not quite, though, since of there's more than one filename with the same letters in unix the tab hit twice will bring up a list of all filenames to choose from where XP just chooses the first one automatically.
 

Skyclad1uhm1

Lifer
Aug 10, 2001
11,383
87
91


<<

<< ls doesn't work, rm doesn't work, mkdir doesn't work, filename completion doesn't work.... >>


Most of those could be created using a simple batch file. What form of filename completion are you referring to? I use the wildcard form all the time...

cd prog*\some*\fold*\etc
>>


I presume he means using [Tab] to complete filenames and directory names. I use that all the time too, quite annoying when working in Windows.
Imagine you have a Program Files directory as well as a Program Fires, then P[Tab] would make Program Fi, and following with l[Tab] would give Program Files\.
Simple as that.

Just noted that you can do P*2, although you still need to know which other ones are there to address the right one that way.
 

notfred

Lifer
Feb 12, 2001
38,241
4
0


<< copy instead of cp, time works, DEL instead of rm.... >>



Yes, and therefore, due to the "instead" they're not unix commands. And try doing del -rf. You can't. There's no unconditional switch for del.

Also, in unix you use "date" not "time".
 

Descartes

Lifer
Oct 10, 1999
13,968
2
0


<< Imagine you have a Program Files directory as well as a Program Fires, then P[Tab] would make Program Fi, and following with l[Tab] would give Program Files\. >>



True, that would be helpful. I might look at writing something to do just that, it wouldn't be all that difficult.
 

notfred

Lifer
Feb 12, 2001
38,241
4
0


<<

<< And try doing del -rf. You can't. There's no unconditional switch for del. >>



del /s /q

:D
>>



hmm, you're right :)
 

Turkey22

Senior member
Nov 28, 2001
840
0
0
Well actually the thing is that these are all DOS commands and some of them you can use in Unix.
A lot of DOS commands are intuitive therefore it makes perfect sense if you were gonna make a command line you would use something intuitive. md for make directory cd for change directory dir for directory, etc. etc. I would think that most people use DOS before they use Unix. Actually now that I know Unix has some DOS commands I may use it more.
 

ScottyB

Diamond Member
Jan 28, 2002
6,677
1
0


<< Well actually the thing is that these are all DOS commands and some of them you can use in Unix.
A lot of DOS commands are intuitive therefore it makes perfect sense if you were gonna make a command line you would use something intuitive. md for make directory cd for change directory dir for directory, etc. etc. I would think that most people use DOS before they use Unix. Actually now that I know Unix has some DOS commands I may use it more.
>>

Unix came out way before DOS did buddy.
 

Descartes

Lifer
Oct 10, 1999
13,968
2
0


<< << Well actually the thing is that these are all DOS commands and some of them you can use in Unix.
A lot of DOS commands are intuitive therefore it makes perfect sense if you were gonna make a command line you would use something intuitive. md for make directory cd for change directory dir for directory, etc. etc. I would think that most people use DOS before they use Unix. Actually now that I know Unix has some DOS commands I may use it more. >>

Unix came out way before DOS did buddy.
>>



I don't think he was saying DOS preceded Unix, he was just saying people are often exposed to a DOS'esque environment before they are unix...
 

Descartes

Lifer
Oct 10, 1999
13,968
2
0


<< the only way you've got Unix commands working in DOS is if you've got something installed such as MKS Toolkit >>



They're just programs, there's no magic going on there. <accent type="spanish">Tookit? We don't need no stinking toolkit!</accent> Many of the programs are actually quite easy to implement, and many people have done so.

 

MrNutz

Banned
Oct 18, 2001
851
0
0
wow...i would have thought most ATers would be fully functional in their DOS skills as well as UNIX....ah the days b4 windows 3.1 with only DOSshell to work with....those were the good 'ol days.....yes most UNIX commands do are cross-compatible with both OSs but they must be implemented correctly.....DEL c:\temp\temp*.* deletes this file and then RM c:\temp\ will remove the empty directory....damn I may have bust out the ol' DOS for Dummies....ha :D
 

Descartes

Lifer
Oct 10, 1999
13,968
2
0


<< UNIX commands do are cross-compatible with both OSs but they must be implemented correctly >>



Huh?



<< DEL c:\temp\temp*.* deletes this file and then RM c:\temp\ >>



rm isn't correct for DOS-based platforms, it's rmdir. Also, no need to del, simply...

rmdir /s /q temp
 

Skyclad1uhm1

Lifer
Aug 10, 2001
11,383
87
91


<<

<< UNIX commands do are cross-compatible with both OSs but they must be implemented correctly >>



Huh?



<< DEL c:\temp\temp*.* deletes this file and then RM c:\temp\ >>



rm isn't correct for DOS-based platforms, it's rmdir. Also, no need to del, simply...

rmdir /s /q temp
>>



Think he is confusing it with 'rd'

the norton utility 'de' worked faster on large dirs btw, just change the first char into Alt-069 :)