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 have a little problem with the command "ls" when i redirect the output to a file
to redirect the output of ls in a file i do
$ls > destinationfile.txt
if i do a "cat" on the destinationfile.txt the file is printed on the screen correctly, but when i edit it with VI (for exemple) i have some strange characteres in the file like "^[[00m" at the begining and at the end of each line does anyone know why and how to redirect the out put of ls in a file with out these characteres?
Thanks in advance.
PS: sorry for this post but if i ask you that is because when i want to use the contenant of the destinationfile.txt in a script that giving me hard time.
I have colourisation turned off by default, but in this case did
an ls *with* it, and this is what I see in vim when I load the
resulting redirected output...
Guess you're just unlucky eh?
FYI I'm on Fedora Core release 3 (Heidelberg), 2.6.10-1.770_FC3smp , vim 6.3.54 in case that helps.
I could manage without colour (old time programmer), but it's handy to have.
Don't think there's been any funny customisation to make it work.
HTH
Sorry, I obviously wasn't clear... what i meant was I have colour at the cmd line eg inc 'ls' and inside vim, and I can vim a file created by 'coloured' ls no prob...
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.