Question:
How do u open a read only file in Unix?
Answer:
vi filename e.g vi abc.txt but you cannot write to it easy way if file is small cat filename and contents is display on screen Source: CoolInterview.com
More filename this can be used even for large files.It will show the first page in the screen.By hitting the Spacebar, the next page can be viewed. Source: CoolInterview.com
Answered by: Sathish | Date: 7/2/2008
| Contact Sathish
I know questions is how to open a read only mode and answer given is perfectly correct.
Just for the information if you want to open a file in read only mode, then use view command. For e.g. "view abc.txt" will open abc.txt in readonly mode regardless of file has write access or not.
Cheers !!! - BeerCoder Source: CoolInterview.com
Answered by: BeerCoder | Date: 7/22/2009
| Contact BeerCoder
vi -r <filename> Source: CoolInterview.com
Answered by: Dinesh Sehra | Date: 7/25/2009
| Contact Dinesh Sehra
If you have the better answer, then send it to us. We will display your answer after the approval.
Rules to Post Answers in CoolInterview.com:-
- There should not be any Spelling Mistakes.
- There should not be any Gramatical Errors.
- Answers must not contain any bad words.
- Answers should not be the repeat of same answer, already approved.
- Answer should be complete in itself.
|