Re: question regarding ls w/ colors and capturing to file

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 01/08/2012, Mikkel L. Ellertson <mellertson@xxxxxxxxx> wrote:
>
>  Also, you can use ls -FR --color | less -R to get rid of the output
> to the screen buffer.

The -F option of 'less' could be added:
     ls -FR --color | less -FR

This activates 'less' only if necessary, when there is more data than
will fit on one screen.
This could then be made into a function, for convenience:

     function myfuncname { ls -FR --color | less -FR ; }

After this is done once, just type myfuncname to run the whole thing
anywhere, anytime
(but only in that shell).
Function definitions like this usually go into .bashrc in your home
directory so that they are automatically defined in every shell you
start.

Also, be aware that the behaviour of less is customisable by setting
an environment variable named LESS. I have
     export LESS="FMRSX#.2"
in .bash_profile in my home directory, so this activates -FR without
needing to specify it explicitly anywhere.
-- 
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
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


[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux