Transferring files from windows to unix, Operating System

Transferring files from Windows to Unix

Be very careful transferring files from Windows to Unix. If you do transfer a file from Windows to Unix open the file, in Unix, using vi.

For example, if you transferred a file named drivers.txt from Windows to Unix open the file in Unix with the command
 
vi -b drivers.txt
 
you will (might) see a lot of ^M's at the end of each line.
 
These MUST be removed using the command shown below or else your input file will have too many newline characters and will not translate properly. That is, your code will not correctly read the input file. You will have an extra newline at the end of every line of your file in Unix. Your code will work on Windows but NOT on Unix.

Still in vi, in command mode (press the Esc key first) do the following
 
:%s/ctrl-v ctrl-m//g
 
ctrl-v ctrl-m means hold down the control key and with the control key down press v then press m.

Posted Date: 2/16/2013 5:54:42 AM | Location : United States







Related Discussions:- Transferring files from windows to unix, Assignment Help, Ask Question on Transferring files from windows to unix, Get Answer, Expert's Help, Transferring files from windows to unix Discussions

Write discussion on Transferring files from windows to unix
Your posts are moderated
Related Questions
Q. Presume that a system is in an unsafe state. Illustrate that it is possible for the processes to complete their execution without entering a deadlock state. Answer: An unsaf

What is the use of boot block? For a computer to begin running when powered up or rebooted it requires having an initial program to run. This bootstrap program tends to be easy

Q. Consider a calculating environment where a process is given the privilege of accessing object only n times. Suggest a scheme for implementing this policy. Answer: Add an i

Q. List three instances of deadlocks that aren't related to a computer system environment. Answer: Two cars passage a single-lane bridge from opposite directions.

how to find ncr value in shell script

Determine a scheduling policy that is most suitable for a time-shared operating system   Round-Robin is a scheduling policy that is most suitable for a time-shared operating s

Introduction of linux

Define which is not a key piece of information, stored in single page table entry, supposing pure paging and virtual memory  A reference for the disk block which stores the pa

Problem: (a) Discuss Distributed File System Caching. (Your discussion should include the goal and architecture of distributed file system caching and the various possible c

Suppose we want to program a Web server; we could easily do so without using concurrency, as follows: while(true) wait connection read from socket and parse url look up url cont