Unix in DOS

Here you will get DOS shell (command.com) implementations of some Unix commands. They might be useful to you for one or more of the following reasons.

You get here the following batch files. Each of these commands can be executed with a -h switch to see what options it supports and in what format you should specify the command-line parameters.

cat
Concatenates files. By default, it sends its output to console. If you want to redirect it to a file, use the -o option (This is unlike Unix).

cp
Copies one or many files to a directory or a file. When it copies multiple files to a file, it behaves as a concatenation command. Use cp -h to know the details.

df
Shows memory usage. Call df -f to see details on available memory.

grep
This is not the Unix grep. It can find only strings and not regular expressions. Use the options -i for case-insensitive search, -n for printing line-numbers of input files where the string apprears and -v for displaying lines not containing the search string.

ls
Listing of files. Options allowed are: -l, -a, -al and -t. -l shows long-listing. -a shows all files (including hidden ones). -al is -l plus -a. Finally, -t shows files sorted according to time (oldest first). ls.bat supports only one option per call.

man
Essentially calls DOS help command.

mv
Moves single or multiple files to a directory. Type mv -h to know the details.

rm
Removes files and/or directories. The -r option deletes recursively.

uname
Shows some machine-specific details. This does not work exactly the same way the unix uname does.

That's it. Things are certainly not serious. It's the result of a little hacking in a free evening. It's my pleasure if you like it. And, of course, you may download all these programs.

Have a nice time......


Abhijit Das (Barda)
Department of Computer Science and Automation
Indian Institute of Science
Bangalore 560 012
INDIA

E-mail: abhij@csa.iisc.ernet.in
URL: http://www.oocities.org/SiliconValley/Lab/6024/index.html


This page hosted by Get your own Free Home Page