How to Copy a Directory from DOS to UNIX
DOS and Unix are both well-seasoned operating software. While they don’t have a graphical user interface, they definitely suffice for those who like barebones, efficient software. For those who still have DOS files on their PC and would like to switch them over to UNIX, here are some tips.
Even though DOS and Unix are similar in some respects, there are major differences, especially if you are transferring over files or a directory of files. Most DOS files are usually saved on older computers with diskettes (remember those?). In order to transfer your DOS files to UNIX, you will either need to have a diskette drive in your Unix machine or you will need to save the files first to your PC and then transfer them over via FTP. Instructions for using FTP on your specific machine will vary, but the directions below should be sufficient (except you should ignore the diskette component).
Transferring an Entire Directory from DOS to UNIX
Here are the simple commands with notes:
Step 1. Have your diskette ready and loaded with the DOS files you would like to transfer over to UNIX
Step 2. Launch Unix and navigate to the Unix directory to which you would like to copy your DOS files.
Step 3. Create a new Unix file dosread.dir by doing the following:
#!/bin/
dosfiles=dosdir notes – This command will list all the DOS files in the Directory notes.
for i in $dosfiles- This command will repeat for each DOS file name.
do
dosread -a notes/$i $i – This command will read from the floppy directory notes.
Done
Command Translations from DOS to UNIX
Once in UNIX, you may want to reference some of the below commands.
| Use | DOS Command | Unix Command |
| Change Directories | cd (also chdir) | cd |
| Copy Files | copy | cp |
| Delete | del | rm |
| Delete Directory and Files | deltree | rm-r |
| List Directory Contents | dir | ls |
| Make a Directory | md | mkdir |
| Remove Empty Directory | rd | rmdir |
| Copy Directory | xcopy | copytar |
- How to Copy UNIX Files to Windows
For those computer users that have both Unix and Window’s operating systems, you should know that you can easily copy your Unix files from a Unix computer and transfer them to a Windows computer. Using Client for NFS, you can transfer any existing Unix files from your Unix server to a Windows based server. It [...]...
- How to find a Unix command
Unix provides hundreds of useful commands for all sorts of purposes, but it is sometimes difficult to find the specific command you are looking for. To assist you with this task, most versions of Unix provide the `man -k` command. The `man -k` command searches the online manual pages to help you find the Unix [...]...
- How to Use the Unix Find Command
The Unix find command, as the name implies, is a command that you can enter into the command line, or terminal, of a Unix operating system, allowing you to process any given set of files or directories. It is a highly useful command that you can take advantage of on Unix based operating system, making [...]...
- How to Use the Unix Sort Command
The Unix sort command is a command for the Unix family of operating systems. It is designed to sort whatever information you give it. The command can be used for a variety of purposes, but it is most frequently employed when there are a number of different files which need to be ordered in some [...]...
- How to Use the Unix Grep Command
The Unix grep command is a search command built into a variety of Unix based operating systems. This command line utility, whose name stems from the original Unix term which means “search globally for lines matching the regular expression, and print them,” can be accessed using the command line or terminal from anywhere in the [...]...




