Chapter 4 Study Guide: Difference between revisions

From ITCwiki
Jump to navigation Jump to search
No edit summary
Line 12: Line 12:
'''Superblock :''' Is the section that contains information about the filesystem. Filesystem Type, Size, status, number of inodes.
'''Superblock :''' Is the section that contains information about the filesystem. Filesystem Type, Size, status, number of inodes.


'''Inodes Table:''' The collection of inodes ''(The portion of a file that stores information on the file’s attributes, access permissions, location, ownership and file type. Each inode contains a unique inode number for identificattion)'' for all files and directories on a filesystem. Each file in the Linux system gets its own inode.
'''Inodes Table:''' The collection of inodes for all files and directories on a filesystem. Each file in the Linux system gets its own inode.
 
'''''Inode'''(The portion of a file that holds information on the file’s attributes, access permissions, where it is located, who owns it, and file type. Each inode contains a unique inode number for identificattion purposes)''  
'''How do you view the inode number? ls -li'''
'''How do you view the inode number? ls -li'''


Line 30: Line 30:
'''How do you create a Hard Link?'''
'''How do you create a Hard Link?'''
To create a hard link you would use the ln (Link) command and specify the existing file to hard link and the target file that will be created.
To create a hard link you would use the ln (Link) command and specify the existing file to hard link and the target file that will be created.
[[File:picture1.png]]


'''Symbolic Link or symlic Charateristics'''
'''Symbolic Link or symlic Charateristics'''
*One file is a pointer or shortcut to another file. These files may point to files located on other partitions or other network drives.
*One file is a pointer or shortcut to another file. The files may point to files located on other partitions or other network drives
*Symbolic links do not share the same inode and inode number with their target file
*Symbolic links do not share the same inode and inode number with their target file
*Different size
*Different size
*Symbolic links point to another file by its name
*Symbolic links point to another file by its name
*Soft links need not reside on the same filesystem
*Soft links do not need to reside on the same filesystem
*removing the target file for a symbolic link breaks the link and it will no longer work.
*removing the target file for a symbolic link breaks the link and it will no longer work.



Revision as of 23:53, 6 February 2012

Understand and Create linked files

What is a linked file? A link is a way of matching two or more file names to the same set of file data.

How many ways can a file be linked? 2 ways

What are they? A symbolic link, or symlic and A hard link.

How are files stored on a file system?

The structural level of a filesystem has three main sections: The superblock, The inode table and data blocks

Superblock : Is the section that contains information about the filesystem. Filesystem Type, Size, status, number of inodes.

Inodes Table: The collection of inodes for all files and directories on a filesystem. Each file in the Linux system gets its own inode. Inode(The portion of a file that holds information on the file’s attributes, access permissions, where it is located, who owns it, and file type. Each inode contains a unique inode number for identificattion purposes) How do you view the inode number? ls -li

Data Blocks: The data that makes up the content of the file as well as the filename. Blocks are also know as allocation units. Hard Link Characteristics

  • In a hard link, two files share the same data
  • Hard Link files are direct copies of one another
  • Same Size
  • They share the same inode and inode number
  • The hard link will look and behave the same as the original.
  • A file can be hard linked an unlimited number of times if the files reside on the same filesystem.
  • Hardlinks can not span across partitions
  • Points to a file by its inode

How do you create a Hard Link? To create a hard link you would use the ln (Link) command and specify the existing file to hard link and the target file that will be created.

Symbolic Link or symlic Charateristics

  • One file is a pointer or shortcut to another file. The files may point to files located on other partitions or other network drives
  • Symbolic links do not share the same inode and inode number with their target file
  • Different size
  • Symbolic links point to another file by its name
  • Soft links do not need to reside on the same filesystem
  • removing the target file for a symbolic link breaks the link and it will no longer work.

How do you create a symbolic link? To create a symbolic link you would use the ln (Link) command and use –s followed by the target file and the file you want to link.

Identify the default permissions created on files and directories

New files are given rw-rw-rw- by the system when they are created.

New directories are given rwxrwxrwx by the system when they are created.