1 / 16

Changing file permissions – chmod Absolute permissions The security implications Using chmod recursively (-R) Directory

In the last Session… ls -l command seven fields nine permissions of a file ls -ld file ownership file permissions (three-tiered file protection system) changing file permissions - chmod relative permissions. Changing file permissions – chmod Absolute permissions

kuri
Télécharger la présentation

Changing file permissions – chmod Absolute permissions The security implications Using chmod recursively (-R) Directory

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. In the last Session… ls -l command seven fields nine permissions of a file ls -ld file ownership file permissions (three-tiered file protection system) changing file permissions - chmod relative permissions

  2. Changing file permissions – chmod • Absolute permissions • The security implications • Using chmod recursively (-R) • Directory permissions • Changing file ownership • chown • chgrp

  3. THE vi EDITOR

  4. CONTENTS • The vi basics • Input mode – entering and replacing text • Saving text and quitting – the ex mode • Navigation • Editing text

  5. vi basics • To write and edit some programs and scripts, we require editors • UNIX provides vi editor for BSD system – created by Bill Joy • Bram Moolenaar improved vi editor and called it as vim (vi improved) on Linux OS

  6. vi <filename> Command mode non existant lines Input mode enter, edit text Current cursor position Current line

  7. ctrl-w to delete any wrong word • esc to return to command mode • Beep indicates a key pressed unnecessarily • Ex mode – execute mode – last line mode • :x saves file on disk and shifts the control from editor to prompt mode ($)

  8. Command mode copy and delete text, can’t enter or replace text • Input mode every key pressed is a text • ex mode save and perform substitution by pressing : and get back to default command mode

  9. THE REPEAT FACTOR • vi provides repeat factor in command and input mode commands • Command mode command k moves the cursor one line up • 10k moves cursor 10 lines up

  10. Undo whenever you make a mistake esc u • Clearing the screen in command mode ctrl-l • Don’t use (capslock) vi commands are case-sensitive • Avoid using the PC navigation keys

  11. INPUT MODE :set showmode messages like INSERT MODE, REPLACE MODE, CHANGE MODE, etc will appear in the last line Pressing ‘i’ changes the mode from command to input To append text to the right of the cursor position, we use a, text

  12. I and A behave same as i and a, but at line extremes I inserts text at beginning of line A appends text at end of line Opening a new line o opens a new line below the current line

  13. r<letter> replacing a single character • s<text/word> replacing text with s • R<text/word> replacing text with R • Press esc key to switch to command mode after you have keyed in text

  14. INPUT MODE COMMANDS COMMAND FUNCTION i inserts text a appends text I inserts at beginneing of line A appends text at end of line o opens line below O opens line above r replaces a single character s replaces with a text S replaces entire line

  15. SAVING TEXT AND QUITTING :W saves file and remains in editing mode :x saves and quits editing mode :wq saves and quits editing mode :w <filename> save as :w! <filename> save as, but overwrites existing file :q quits editing mode :q! quits editing mode by rejecting changes made :sh escapes to UNIX shell :recover recovers file from a crash

  16. THANK YOU

More Related