Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then 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.
The only difference is that DOS/Windows text files use ^M to represent a line feed. Unix/Linux ones don't.
Again, I'd prefer to use a native Linux app rather than run a Windows one in Wine, otherwise what is the point?
I understand that text is text... and the line-feed issue. However, with some of the files here is what I get with gedit:
Code:
gedit has not been able to detect the character encoding.
Please check that you are not trying to open a binary file.
Select a character encoding from the menu and try again.
My choices for encoding are UTF-8, ARMSCII-8 or ISO-8859. None of them work. I'd be happy if I could figure out what hte problem is and run some sort of shell script to fix this on new files being downloaded. Then I could just stick with gedit.
The files open just fine if I boot to Windows and/or use Gvim in Linux. The main drawback to GVIM is the clipboard issue.
However, it looks my issue the clipboard problem referred to in this thread. At least now I know what is happening.
Ok, I found something interesting. I have a text file (can open with a text editor), can cat it and do all the other stuff with it but linux thinks it is a data file. That probably explains why gedit can't open it.
strings command did not work. od did not work. Any other ideas?
"new\ " means the "\" is an escape character to say there is a space there. I could run the same command but put everything in quotes if I wanted to. The tab key just autofills the "\"
it might be the "windows" mount permissions
i am working out the kinks in a suse11.3 centos 5.5 and win7 system
the MS vs c++ redis. elua text files ARE +x 777 ( on the win drive)
and gnome says "open or run"
gedit : opens them as a normal formatted text file
emacs : as a normal formated doc, with the ^m tags
ViM : as a normal formated text doc ,WITHOUT the ^m tags
Nano : fubars it
Vi : opens it just fine
why the need for dos2unix
and why " new\ dir1.txt " -- why the space ?
you can just quote it "new test file.txt" or NewTestFile.txt , new_test_file.txt
space is there cuz that is what the customer named it. I don't bother renaming all the files I get. it would take too much time. I know I can quote it, but tab key autofills the \ when there are spaces in a filename. It turned out to be a null character at the start of the file. running it through the strings command fixed it. I think I screwed the command up when I tried it earlier today.
now I will just start using gedit and run strings if I need to.
was trying dos2unix to see what it could do with the file.
It's really better to pick an editor that can switch between DOS type mode and UNIX type mode with reference to the current file being open. Using dos2unix may be a way to edit a file in a UNIX-only editor but what if you'll use the file again in windoze? Don't you think you'll have to use unix2dos to put it back again?
Quote:
Originally Posted by crokett
Again, I'd prefer to use a native Linux app rather than run a Windows one in Wine, otherwise what is the point?
The point of running Linux if you are just going to clutter it up with windows apps? Unless of course there aren't any alternatives for what you need to run.
As for dos2unix, that was just a test to see if it could do anything with the file. It couldn't.
The point of running Linux if you are just going to clutter it up with windows apps?
I see no problem with that. Does all of Linux become windows when you do that? What do you mean clutter it up? It's installed properly just like other apps. That doesn't make sense. Or is it that you just consider windows apps as dirt?
Quote:
Originally Posted by crokett
Unless of course there aren't any alternatives for what you need to run.
Of course but not unless you wanted something with same functionality as your favorite editor.. like me wanting Notepad++.
Quote:
As for dos2unix, that was just a test to see if it could do anything with the file. It couldn't.
I see no problem with that. Does all of Linux become windows when you do that? What do you mean clutter it up? It's installed properly just like other apps. That doesn't make sense. Or is it that you just consider windows apps as dirt?
Of course but not unless you wanted something with same functionality as your favorite editor.. like me wanting Notepad++.
Have you tried it with VIM?
No. But I'm of the mind that if I am running Linux I will try to run native apps. I have a Windows text editor I like too. I also have a native linux one that provides the same functionality and runs much faster, especially with the 25MB+ text files I frequently work with. So if I can get the same functionality in a native linux app, why bother installing wine? To each his own I guess. By the same token I haven't installed Cygwin in Windows to get linux functionality. If I want Linux I boot to Linux.
GVIM opens the files just fine, it just has issues with the clipboard. Gedit can't open the files, but doesn't have the clipboard issues.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.