Linux/Unix File System Interview Questions

UNIX

Q: What’s the difference between Symbolic Link and HardLink?
A:  ln –s src dst-file    vs.  ln src-file dst-file
You need to understand how file is stored on the File System and what I-node is all about?
Each file contains 2 things:  file-name and structure that stores the real-data of the file.
Symbolic link is like: Added link to the filename only. It can cross device/logical partition.
Harlink is made at I-node(filesystem) level, it’s confined within the same filesystem(physical device). It’s more like adding a reference count to the original file, when hardlink is deleted, the reference minus one only.

Some people on the internet says this:
HardLink is a pointer to a file, Symbolic Link is an indirect-pointer to a file.
Since symbolic link can point to non-existent file on the disk, Hardlink can not.

Q:  How much do you know about journalized file system? Why Journalized File System(JFS)?
A:    Large HardDisk Partiion; quick recovery from crashes, high-performance I/O; Terabytes data file
Alternative to ext2 there are: ext3, ReiserFS, XFS, JFS
Advantage of JFS:
1.    Simplify restarts (longer fsck means longer down time)
2.    reduce fragmentation
3.    accelerate I/O
4.    obsolete fsck()

In ext2:   I-NODE stores all info about a file except data itself, it’s a book-keeping file for a file.
Directory’s I-Node contains: inode numbers of its contents, plus permissions, # of blocks, and etc.

Juornal: simply a list of transactions (modifies meta-data structures: inodes, free lists, directory entries).

Onlye ext3 is backward compatible.        tune2fs –j /dev/hdb3

同类其他面试题 点击新一篇或旧一篇可浏览全部同类面试题

新一篇:
旧一篇:

你有答案? 你对以上面试题有意见? 你想发表你的见解? 写下来吧!你的分享将会让很多人受益!

相关面试题

·unix时间戳与datetime类型时间之前的转换
·POSIX方面的知识
·Unix英文面试题
·Unix笔试题 Unix工程师
·介绍一下Unix的启动过程

版权声明:本站大部分内容为原创! 另有少部分内容整理于网络,如需转载本站内容或关切版权事宜请联系站长。未经允许,严禁复制转载本站内容,否则将追究法律责任。 本站欢迎与同类网站建立友情链接,请联系QQ:176687814