LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   file corruption!! (https://www.linuxquestions.org/questions/linux-general-1/file-corruption-443532/)

vishamr2000 05-10-2006 01:29 PM

file corruption!!
 
Hi to all,

I wanted some views on the following:

When I copy .txt and .c files from my linux partition to my C (Windows) drive, and then burn them on a CD in Windows, those .txt and .c files no longer work on linux. Can s.o tell me why is that so and how can I solve this problem without having to type it again in linux.

Warm regards,
Visham

gilead 05-10-2006 02:24 PM

Since I can't see the files I'm guessing, but if the line endings in the files get converted to MS-DOS (carriage return/line feed) that can affect whether they operate properly under Linux.

To avoid it, can you burn the CD under Linux? If not, can you create the ISO under Linux and copy the ISO to Windows?

vishamr2000 05-11-2006 12:25 AM

Hi gilead,

Many thx for the reply..

You've guessed right about what happens to the files..no, I can't burn under linux..how do I create the iso files under linux; what configurations/software do I have to use?

Warm regards,
Visham

TigerOC 05-11-2006 03:35 AM

Burning a cd is both easier and quicker with Linux. ( I am assuming a dual boot with the same cd drive here)

Create the iso file;

mkisofs -r -o name_of_file.iso /home/usr_name/source_directory

This will produce the file name_of_file.iso

To burn to cd do (with a 2.6.X kernel);

cdrecord -v dev=/dev/hdX /home/usr_name/source_directory/name_of_file.iso
where X is the relevant drive number.

tredegar 05-11-2006 07:27 AM

You could also take a look at the man pages for the utilities dos2unix and unix2dos which will convert between the end-of-lines used by dos and unix (linux) and vice versa. This would mean that you do not have to re-burn your CD.

HTH

vishamr2000 05-12-2006 01:45 AM

Many thx to all you guys for the very handy suggestions..

Warm regards,
Visham


All times are GMT -5. The time now is 05:37 AM.