Links - PowerPoint PPT Presentation

1 / 9
About This Presentation
Title:

Links

Description:

Since UNIX is a multi-user operating system, it makes sense to allow users to ... Advantage ... Advantage: Can be used by users to link directories. Can link ... – PowerPoint PPT presentation

Number of Views:29
Avg rating:3.0/5.0
Slides: 10
Provided by: Kami47
Category:
Tags: advantage | links | multi

less

Transcript and Presenter's Notes

Title: Links


1
Links
  • Hard Link
  • Symbolic Link

2
Linking Files
  • Since UNIX is a multi-user operating system, it
    makes sense to allow users to share files to
    collaborate on projects (such as programming
    projects, reports, etc.)

3
Linking Files
  • In order to avoid duplication and inefficiency
  • it is better to provide links between files to
    give user illusion that what is edited on their
    file affects contents on other groups files.

4
File ID
  • Each file contains information regarding the file
    itself file identification
  • This information is called i-node number. To view
    i-node information, you can issue the UNIX
    command
  • ls -i
  • 705900 testone706640 letter2703817 memo1

5
Hard Link
  • 1. Hard Link
  • ln existing_file linked_file
  • -pointer to a file
  • A directory entry containing the same i-node
    number of a file. All files have at least one
    hard-link - when removed, the link is removed

6
Symbolic (soft) Link
  • 2. Symbolic Link
  • ln -s existing_file linked_file
  • - indirect pointer to a file
  • A directory entry containing pathname to file
    (i.e. a pointer). Unlike hard links, i-node
    numbers can be different, but possess other
    useful features.

7
Hard Link Features
  • Disadvantage
  • Cannot make hard links to directories(except the
    superuser)
  • Cannot cross different file systems
  • Advantage
  • When original file that other users linked to
    is removed linked file(s) will still exist.

8
Symbolic (soft) Link Features
  • Advantage
  • Can be used by users to link directories
  • Can link across different file systems
  • Disadvantage
  • Symbolic links do not have the same status (legal
    names vs pseudonyms)
  • Linked file will be removed if the original file
    removed

9
(No Transcript)
Write a Comment
User Comments (0)
About PowerShow.com