Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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?
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?
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
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.
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.
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.
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
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.
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 ?
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.
@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.
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 !!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.