question regarding ls w/ colors and capturing to file
Fedora List:
I can run "ls -FR" on a directory and get a lovely listing with lots of color coded information to let me know what is what. I have hit a directory that is big enough that scrolling though the output isn't efficient. I would like to capture the output of "ls -FR" into a file that preserves the color coding (I don't want to read each file as I wish to visually scan to see if something isn't right and color is a great way to see it). My attempts with "more" have stripped color. So has "less". Does anyone have an idea how to capture the output of "ls -FR" that keeps the color coding? This is a low priority item ... just something that would be nice to be able to do Thanks in advance, Paul -- users mailing list users@lists.fedoraproject.org To unsubscribe or change subscription options: https://admin.fedoraproject.org/mailman/listinfo/users Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines Have a question? Ask away: http://ask.fedoraproject.org |
question regarding ls w/ colors and capturing to file
On 07/31/2012 02:15 PM, Paul Allen Newell wrote:
> Fedora List: > > I can run "ls -FR" on a directory and get a lovely listing with lots of color coded information to let me know what is what. I have hit a directory that is big enough that scrolling though the output isn't efficient. I would like to capture the output of "ls -FR" into a file that preserves the color coding (I don't want to read each file as I wish to visually scan to see if something isn't right and color is a great way to see it). > > My attempts with "more" have stripped color. So has "less". Does anyone have an idea how to capture the output of "ls -FR" that keeps the color coding? > > This is a low priority item ... just something that would be nice to be able to do > > Thanks in advance, > Paul script -c "ls -FR --color" outfile -- Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. -- Rick Cook, The Wizardry Compiled -- users mailing list users@lists.fedoraproject.org To unsubscribe or change subscription options: https://admin.fedoraproject.org/mailman/listinfo/users Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines Have a question? Ask away: http://ask.fedoraproject.org |
question regarding ls w/ colors and capturing to file
On 7/30/2012 11:22 PM, Ed Greshko wrote:
script -c "ls -FR --color" outfile Ed: Thanks for the very prompt reply. I tried the command and I am not getting what I expect when I open the file. Part of the problem (maybe large part) is that I am opening in vim. What editor should I use for seeing this as all I get in vim is 1) no color and 2) alot of control-M's Best, Paul -- users mailing list users@lists.fedoraproject.org To unsubscribe or change subscription options: https://admin.fedoraproject.org/mailman/listinfo/users Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines Have a question? Ask away: http://ask.fedoraproject.org |
question regarding ls w/ colors and capturing to file
On 07/31/2012 02:48 PM, Paul Allen Newell wrote:
> Thanks for the very prompt reply. I tried the command and I am not getting what I expect when I open the file. Part of the problem (maybe large part) is that I am opening in vim. What editor should I use for seeing this as all I get in vim is 1) no color and 2) alot of control-M's OK..... In my haste, I misunderstood your needs. What I gave you basically captures the control characters which produce the colors in the terminal. So, if you "cat" the file you'll see the colors. At the moment, I can't think of what editor would retain the colors. :-( I'll try to think a bit more.... -- Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. -- Rick Cook, The Wizardry Compiled -- users mailing list users@lists.fedoraproject.org To unsubscribe or change subscription options: https://admin.fedoraproject.org/mailman/listinfo/users Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines Have a question? Ask away: http://ask.fedoraproject.org |
question regarding ls w/ colors and capturing to file
On 07/31/2012 03:45 PM, Ed Greshko wrote:
> I'll try to think a bit more.... I just realized you mentioned "more" and "less" in your original post.... less -r outfile Will show the colors.... Is that sufficient? -- Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. -- Rick Cook, The Wizardry Compiled -- users mailing list users@lists.fedoraproject.org To unsubscribe or change subscription options: https://admin.fedoraproject.org/mailman/listinfo/users Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines Have a question? Ask away: http://ask.fedoraproject.org |
question regarding ls w/ colors and capturing to file
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1 On 07/31/2012 02:53 AM, Ed Greshko wrote: > On 07/31/2012 03:45 PM, Ed Greshko wrote: >> I'll try to think a bit more.... > > I just realized you mentioned "more" and "less" in your original post.... > > less -r outfile > > Will show the colors.... Is that sufficient? > Wouldn't -R work better then -r? Mikkel - -- Do not meddle in the affairs of dragons, for thou art crunchy and taste good with Ketchup! -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iEYEARECAAYFAlAXvbcACgkQqbQrVW3JyMRpTgCfU1oZxsN6AF cO6XRW3Vz+hHhk m84Anj8r8r+m6xHTNni+OAQ8FHyU2ECG =IxUn -----END PGP SIGNATURE----- -- users mailing list users@lists.fedoraproject.org To unsubscribe or change subscription options: https://admin.fedoraproject.org/mailman/listinfo/users Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines Have a question? Ask away: http://ask.fedoraproject.org |
question regarding ls w/ colors and capturing to file
Just gotta say Ed, you're like.....the Wizard when it comes to this stuff!..LoL!
Sent from Eddie's Cell Phone ----- Reply message ----- From: "Ed Greshko" <Ed.Greshko@greshko.com> To: "Community support for Fedora users" <users@lists.fedoraproject.org> Subject: question regarding ls w/ colors and capturing to file Date: Tue, Jul 31, 2012 2:22 am On 07/31/2012 02:15 PM, Paul Allen Newell wrote: > Fedora List: > > I can run "ls -FR" on a directory and get a lovely listing with lots of color coded information to let me know what is what. I have hit a directory that is big enough that scrolling though the output isn't efficient. I would like to capture the output of "ls -FR" into a file that preserves the color coding (I don't want to read each file as I wish to visually scan to see if something isn't right and color is a great way to see it). > > My attempts with "more" have stripped color. So has "less". Does anyone have an idea how to capture the output of "ls -FR" that keeps the color coding? > > This is a low priority item ... just something that would be nice to be able to do > > Thanks in advance, > Paul script -c "ls -FR --color" outfile -- Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. -- Rick Cook, The Wizardry Compiled -- users mailing list users@lists.fedoraproject.org To unsubscribe or change subscription options: https://admin.fedoraproject.org/mailman/listinfo/users Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines Have a question? Ask away: http://ask.fedoraproject.org -- users mailing list users@lists.fedoraproject.org To unsubscribe or change subscription options: https://admin.fedoraproject.org/mailman/listinfo/users Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines Have a question? Ask away: http://ask.fedoraproject.org |
question regarding ls w/ colors and capturing to file
On 07/31/2012 07:12 PM, Mikkel L. Ellertson wrote:
> Wouldn't -R work better then -r? Yes, it would be better. -- Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. -- Rick Cook, The Wizardry Compiled -- users mailing list users@lists.fedoraproject.org To unsubscribe or change subscription options: https://admin.fedoraproject.org/mailman/listinfo/users Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines Have a question? Ask away: http://ask.fedoraproject.org |
question regarding ls w/ colors and capturing to file
On 07/31/2012 12:45 AM, Ed Greshko wrote:
At the moment, I can't think of what editor would retain the colors. :-( If it\'s too long, run it through either more or less. -- users mailing list users@lists.fedoraproject.org To unsubscribe or change subscription options: https://admin.fedoraproject.org/mailman/listinfo/users Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines Have a question? Ask away: http://ask.fedoraproject.org |
question regarding ls w/ colors and capturing to file
On Tue, Jul 31, 2012 at 10:10:22AM -0700, Joe Zeff wrote:
> On 07/31/2012 12:45 AM, Ed Greshko wrote: > >At the moment, I can\'t think of what editor would retain the colors. :-( > > If it\'s too long, run it through either more or less. I think the complete command that would satisfy the OP is: ls -C --color=always | less -R -- This email is confidential, and now that you have read it you are legally obliged to shoot yourself. Or shoot a lawyer, if you prefer. If you have received this email in error, place it in its original wrapping and return for a full refund. By opening this email, you accept that Elvis lives. -- users mailing list users@lists.fedoraproject.org To unsubscribe or change subscription options: https://admin.fedoraproject.org/mailman/listinfo/users Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines Have a question? Ask away: http://ask.fedoraproject.org |
| All times are GMT. The time now is 11:28 AM. |
VBulletin, Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.