question regarding ls w/ colors and capturing to file

Mikkel L. Ellertson mellertson at gmail.com
Wed Aug 1 01:24:25 UTC 2012


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 07/31/2012 08:00 PM, Paul Allen Newell wrote:
> On 7/31/2012 4:35 AM, Ed Greshko wrote:
>> On 07/31/2012 07:12 PM, Mikkel L. Ellertson wrote:
>>> Wouldn't -R work better then -r?
>> Yes, it would be better.
>>
>
> Ed and Mikkel:
>
> +++
> script -c "ls -FR --color" outfile; less -R outfile
> +++
>
> works great. Its a bit of a pain to not be able to use an editor
to scan the file, but I am happy to be able to get "page breaks"
with the color as that's better than setting a window scroll memory
to 10K lines (and it seems the script command gives me that anyway
as everything goes to the screen first.
>
> Many thanks,
> Paul
>
>
Paul,
 You may want to look at the search capabilities built into less.
(man less). Unless you need to modify the file, less should let you
do what you want.
 Also, you can use ls -FR --color | less -R to get rid of the output
to the screen buffer.

Have fun.
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)

iEYEARECAAYFAlAYhUkACgkQqbQrVW3JyMTXsACbBSH6/Obxw8PBkXY9mIY0swRj
3QkAn0pTRNV9l4j/FT4opQUzqUd+0Azb
=dtDM
-----END PGP SIGNATURE-----



More information about the users mailing list