LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-23-2009, 09:45 AM   #1
fzanella
LQ Newbie
 
Registered: Feb 2009
Posts: 21

Rep: Reputation: 1
Problem reading Linux .txt files in Windows


I executed several tests on my Linux RHEL4 box, and created .txt files. I placed these files onto a USB flah drive, so I can read them on my Windows machine. When I open the USB drive in Windows, I see a ****.camrec file. I've never heard of a CAMREC file, can you help me determine what this is? There's nothing else on the USB drive, is there a better way of moving Linux .txt files through a USB to be read in Windows?
 
Old 04-23-2009, 09:51 AM   #2
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983
You can find what a camrec file is at http://filext.com/file-extension/CAMREC. The question is: are the *.txt files been copied onto the USB drive? What is the filesystem on the USB drive?
 
Old 04-27-2009, 02:18 PM   #3
fzanella
LQ Newbie
 
Registered: Feb 2009
Posts: 21

Original Poster
Rep: Reputation: 1
The USB flash drive works in Windows. Can it be formatted to be used in both Linux and Windows?
 
Old 04-27-2009, 02:38 PM   #4
Robhogg
Member
 
Registered: Sep 2004
Location: Old York, North Yorks.
Distribution: Debian 7 (mainly)
Posts: 653

Rep: Reputation: 97
Are you unmounting the flash drive properly from your Red Hat box, before removing it (in Gnome/KDE, you should be able to right-click and select "Unmount", from the command line issue the command sudo umount <mountpoint>)?

Sometimes when you copy a file to another drive, the file is only placed in the disk cache and not actually written to disk until the cache is flushed. Unmounting the drive forces a flush.

Quote:
Originally Posted by fzanella View Post
The USB flash drive works in Windows. Can it be formatted to be used in both Linux and Windows?
If it's formatted as FAT, it will definitely be usable with Linux, and most modern versions of Linux handle NTFS without problems.

Last edited by Robhogg; 04-27-2009 at 02:40 PM.
 
Old 04-27-2009, 03:08 PM   #5
PTrenholme
Senior Member
 
Registered: Dec 2004
Location: Olympia, WA, USA
Distribution: Fedora, (K)Ubuntu
Posts: 4,187

Rep: Reputation: 354Reputation: 354Reputation: 354Reputation: 354
Note that the "end-of-line" indicator used by modern operating systems is a single ASCII "new line" character, whilst Windows uses tho older two character sequence of an ASCII "carriage return" followed by a "new line." IIRC, "notepad" has an option to convert, but you should be aware of the possible problem.
 
Old 04-27-2009, 03:13 PM   #6
john test
Member
 
Registered: Jul 2008
Distribution: ubuntu 9.10
Posts: 527
Blog Entries: 1

Rep: Reputation: 35
Wordpad works much better on Linux text files than does notepad
I have copied linux files to windows laptop for safe keeping and they don't do well in Notepad but if I bring them up in Wordpad they look great.
 
Old 04-27-2009, 03:30 PM   #7
brianL
LQ 5k Club
 
Registered: Jan 2006
Location: Oldham, Lancs, England
Distribution: Slackware64 15; SlackwareARM-current (aarch64); Debian 12
Posts: 8,298
Blog Entries: 61

Rep: Reputation: Disabled
EditPad Lite is a good free text editor to use in Windows. It automatically opens and saves files with the right line-ending, and can convert from one to any other.
http://www.editpadpro.com/editpadlite.html

Last edited by brianL; 04-27-2009 at 03:31 PM.
 
Old 04-27-2009, 07:12 PM   #8
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,659
Blog Entries: 4

Rep: Reputation: 3938Reputation: 3938Reputation: 3938Reputation: 3938Reputation: 3938Reputation: 3938Reputation: 3938Reputation: 3938Reputation: 3938Reputation: 3938Reputation: 3938
There are also little Unix commands like dos2unix and unix2dos. Several ways to do it.

And... quite a few Windows editors do understand alternate line-endings. Windows is not quite as much in the "no other world but my world" attitude that it used to have.
 
Old 04-28-2009, 08:03 AM   #9
farslayer
LQ Guru
 
Registered: Oct 2005
Location: Northeast Ohio
Distribution: linuxdebian
Posts: 7,249
Blog Entries: 5

Rep: Reputation: 191Reputation: 191
I'm a fan of Notepad++ for a text editor on Windows..


I'm curious if the OP resolved the file issue or not ? the original question was not about what text editor can be used to read linux text files in Windows..


Was the issue improper unmounting of the drive ?
failure to sync prior to unmounting ?
did you ever figure out where those *.camrec files came from ?
did the first part of the file name match the text file you thought was being copied to the flash drive ?
 
Old 04-29-2009, 09:19 AM   #10
fzanella
LQ Newbie
 
Registered: Feb 2009
Posts: 21

Original Poster
Rep: Reputation: 1
Thanks for the comments. I discovered the problem was that I didn't 'unmount' the USB drive from the Linux box, so no text files were written. I tried it again, unmounted and now can open the .txt files in Windows.
The .camrec files on the USB drives were CAMTASIA video files which had been copied onto it 2 weeks ago when I was at a conference.
 
Old 04-29-2009, 09:54 AM   #11
theYinYeti
Senior Member
 
Registered: Jul 2004
Location: France
Distribution: Arch Linux
Posts: 1,897

Rep: Reputation: 66
@PTrenholme: The end-of-line has nothing to do with the OS being modern or not.

At the beginning, control characters were intended to make the computer able to do what a typewriter was able to. Among those things were: TAB (move to the next mark on the line), CR (return the “cursor” to the start of the line, left only), LF (move the “cursor” one line down only)…

Typewriters allowed you to move the page/cursor up and down, and allowed you to go to the start of the line; and a clever part of the machine allowed you to do both in one move, but that's still two operations in one move.

The way DOS encodes end-of-lines (and was neither the first nor the last to do) is actually the more exact way of doing so*: CR+LF = Carriage return + Line feed.
For some reason, Unix decided that LF alone was enough. For some reason, MacOS decided that CR alone was enough. I fail to see how either of these is more modern.

Yves.
 
Old 04-29-2009, 10:39 AM   #12
farslayer
LQ Guru
 
Registered: Oct 2005
Location: Northeast Ohio
Distribution: linuxdebian
Posts: 7,249
Blog Entries: 5

Rep: Reputation: 191Reputation: 191
Quote:
Originally Posted by fzanella View Post
Thanks for the comments. I discovered the problem was that I didn't 'unmount' the USB drive from the Linux box, so no text files were written. I tried it again, unmounted and now can open the .txt files in Windows.
The .camrec files on the USB drives were CAMTASIA video files which had been copied onto it 2 weeks ago when I was at a conference.
Thanks for coming back with the follow up and resolution. Much appreciated !!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How can read from file.txt C++ where can save this file(file.txt) to start reading sam_22 Programming 1 01-11-2007 05:11 PM
Taking .txt files from Linux to Windows NT on Floppy Disk???? rnk103 Linux - General 1 09-18-2003 06:43 AM
reading windows files on linux bugsbunny Linux - Newbie 1 01-29-2003 12:28 PM
Reading Windows files in Linux NiagraBob Linux - Newbie 4 11-18-2002 08:37 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:01 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration