Simple text fiel viewere?
parv_fm at emailgroups.net
Tue May 20 22:13:44 PDT 2003
in message <20030521011017.GA9791 at teddy.fas.com>, wrote stan
> I'm looking for a simple (notepad like) text file viewer. I need
> to be able to use this in "read only" mode WO the posibiliy of the
> user editing the file.
It's too easy to bring up an editor while using less, unless one
sets too complicated key binding to be typed accidentally. At least
that is the case for me.
I use an vim alias to avoid accidental changes (both changing the
buffer and overwriting file); vim nags when i do. If i would really
need to edit the file, i would need to explicitly set the modifiable
option. In actuality, i just quit that particular session, and
start vim in regular mode (file can be saved & modified). Below is
the alias (for sh like shells)...
alias view='vim -RM'
...but i suppose that would not quit cut it, as you want to remove
even the possibility of editing. Other editor/viewer choices that
i know of w/o looking in ports/editors are...
cat <file> | less
cat <file> | xless
gv (viewing file as PDF or PS)
xmessage -file <file>
...but none of them can beat, in increasing order of safety and
complexity, read-only permissions, uchg or schg flag, and secure
I think "xmessage" solves the problem quite easily.
More information about the freebsd-questions