Week05 - ULI101 Week 05 Week Overview File system links Hard and symbolic links Process management Storage quota information(quota Printing What is

Info iconThis preview shows pages 1–11. Sign up to view the full content.

View Full Document Right Arrow Icon
ULI101 Week 05
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Week Overview File system links Hard and symbolic links Process management Storage quota information (quota) Printing
Background image of page 2
What is a file system Link? A link is a pointer to a file. This pointer associates a file name with a number called an i-node number An i-nod e is the control structure for a file (on a UNIX/Linux file system) If two file names have the same i-node number, they are links to the same file
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
What is a file system Link? Use the command “ ls -i ” to print i-node number of each file: [[email protected] week8]$ ls -i 32764 lab3a.html 37745 lab3b.html 37740 lab3.zip Use the command “ ls -il ” for long listing [[email protected] week8]$ ls -il total 40 32764 -rw-r--r-- 1 ray ray 1097 Sep 13 08:53 lab3a.html 37745 -rw-r--r-- 1 ray ray 6582 Sep 13 08:53 lab3b.html 37740 -rw-rw-r-- 1 ray ray 6218 Sep 14 00:05 lab3.zip i-node
Background image of page 4
What is a file system Link? There are two kinds of links: 1. Hard Links 2. Soft or Symbolic Links
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Hard Links Hard link is a reference to the physical data on a file system More than one hard link can be associated with the same physical data Hard links can only refer to data that exists on the same file system Only the root user can create hard links to a directory When a file has more than one link, you can remove any one link and still be able to access the file through the remaining links.
Background image of page 6
Hard Links Example: Assume you used “vi” to create a new file, you create the first hard link ( vi myfile ) To Create the 2 nd , 3 rd and etc. hard links, use the command: ln myfile link-name
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Display Hard Links info Create a new file called “myfile” Run the command “ls -il” to display the i- node number and link counter 38753 -rw-rw-r-- 1 uli uli 29 Oct 29 08:47 myfile ^ ^ |-- inode # |-- link counter (one link)
Background image of page 8
Display Hard Link Info Create a 2 nd link to the same data: ln myfile mylink Run the command “ls -il”: 38753 -rw-rw-r-- 2 uli uli 29 Oct 29 08:47 myfile 38753 -rw-rw-r-- 2 uli uli 29 Oct 29 08:47 mylink ^ ^ |-- inode # |-- link counter (2 links)
Background image of page 9

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Add the 3 rd Link Create a 3 rd link to the same data: ln myfile newlink Run the command “ls -il”: 38753 -rw-rw-r-- 3 uli uli 29 Oct 29 08:47 myfile 38753 -rw-rw-r-- 3 uli uli 29 Oct 29 08:47 mylink 38753 -rw-rw-r-- 3 uli uli 29 Oct 29 08:47 newlink ^ ^ |-- inode # |-- link counter (3 links)
Background image of page 10
Image of page 11
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 07/10/2011 for the course CTY 101 taught by Professor Don during the Spring '11 term at Seneca.

Page1 / 29

Week05 - ULI101 Week 05 Week Overview File system links Hard and symbolic links Process management Storage quota information(quota Printing What is

This preview shows document pages 1 - 11. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online