Problems with file opening

Hi All, I have a file test.dat. When I view this file using code1 , that time no problem. But when I open this file using code2, that time some lines are missing. I don't know why is the problem occurred. I already convert dos2unix fromat. But problem is not solving. Please help me about the reason. code1 : view test.dat code2 : vi test.dat

Please show us a representative sample of the data, using this "sed" command to make control codes visible:

For example (if the problem happens in the first 10 lines).

head -10 test.dat | sed -n l

Note that "dos2unix" will only work if the original file was a Microsoft format Text file of the type created by Notepad.
It will not work on raw database files.

Hi, This file contain 10000 row. Problem not in particular line. It's may be line 10, line 102, line 850. I want to know the command which is similar to cat command, not less,head or tail like that.

Perhaps you mean:

more test.dat

All of these unix commands assume that the file is a correctly formatted unix text file with each line terminated with a linefeed character.
To see the line terminators (as dollar signs) and any strange characters:

sed -n l test.dat | more

If the file is not a text file and the original file would not display correctly on the original computer using Windows Notepad, then you will need a different technique (possibly a proper programming language) to work on the file in unix.
By convention a ".dat" file is not a text file.