Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống
1
/ 68 trang
THÔNG TIN TÀI LIỆU
Thông tin cơ bản
Định dạng
Số trang
68
Dung lượng
737,5 KB
Nội dung
Khoa Công nghệ Thông tin Trường Đại học Nông lâm TP Hồ Chí Minh Chương 1: Linux (Review) The Virtual File System Structure (VFS) VFS định nghĩa tập hợp chức mà filesystem phải có Giao tiếp xây dựng tập hợp thao tác gắn liền tới đối tượng là: 1.Filesystems inodes, and open files Bài giảng môn học Quảng Trị Mạng Khoa Công nghệ Thông tin Trường Đại học Nơng lâm TP Hồ Chí Minh Hệ thống tập tin EXT2 • Đơn vị sở hệ thống tập tin EXT2 i-node Đây cấu trúc điều khiển đặc biệt trực tiếp tới tới block liệu (data block) tới i-node khác • Hệ thống EXT2 cho phép i-node liên kết tối đa mức, độ lớn tối đa tập tin GB • I-node lưu thơng tin tập tin thư mục hệ thống tập tin Mỗi tập tin tạo phân bổ inode lưu thông tin sau: – Loại tập tin quyền hạn truy cập tập tin – Người sở hữu tập tin – Kích thước tập tin số hard link đến tập tin – Ngày thời gian chỉnh sửa tập tin lần cuối – Vị trí nội dung tập tin hệ thống tập tin • Các thư mục EXT2 xem tập tin đặc biệt chứa trỏ đến i-node entry Bài giảng môn học Quảng Trị Mạng Khoa Công nghệ Thông tin Trường Đại học Nơng lâm TP Hồ Chí Minh I-Node and Data block in EXT2 FS Bài giảng môn học Quảng Trị Mạng Khoa Công nghệ Thông tin Trường Đại học Nơng lâm TP Hồ Chí Minh I-Node and Data block in EXT2 FS • mode inode can describe one of file, directory, symbolic link, block device, character device • Owner Information The user and group identifiers of the owners of this file or directory This allows the file system to correctly allow the right sort of accesses • Size The size of the file in bytes Bài giảng môn học Quảng Trị Mạng Khoa Công nghệ Thông tin Trường Đại học Nơng lâm TP Hồ Chí Minh I-Node and Data block in EXT2 FS • Timestamps The time that the inode was created and the last time that it was modified • Datablocks Pointers to the blocks that contain the data that this inode is describing The first twelve are pointers to the physical blocks containing the data described by this inode and the last three pointers contain more and more levels of indirection Bài giảng môn học Quảng Trị Mạng Khoa Công nghệ Thông tin Trường Đại học Nơng lâm TP Hồ Chí Minh Directories in EXT2 FS Directories are implemented as a special type of files Actually, a directory is a file containing a list of entries Each entry contains an inode number and a file name Bài giảng môn học Quảng Trị Mạng Khoa Công nghệ Thông tin Trường Đại học Nông lâm TP Hồ Chí Minh Running Programs at Boot Time • The /etc/rc.d/rc.local script is executed by the init command at boot time or when changing runlevels Adding commands to this script is an easy way to perform necessary tasks like starting special services or initialize devices without writing complex initialization scripts in the /etc/rc.d/init.d/ directory and creating symbolic links • The /etc/rc.serial script is used if serial ports must be setup at boot time This script runs set serial commands to configure the system's serial ports Bài giảng môn học Quảng Trị Mạng Khoa Công nghệ Thông tin Trường Đại học Nơng lâm TP Hồ Chí Minh Using the root user • Using the root Login • Becoming Super User (The su Command) • With current environment $ su Password: ****** # • With root environment $ su – Password: ****** # • Become another user than root $ su – user_name Bài giảng môn học Quảng Trị Mạng Khoa Công nghệ Thông tin Trường Đại học Nông lâm TP Hồ Chí Minh Reconfiguring hardware with kudzu • The kudzu program is a hardware autodetection and configuration tool that runs automatically at boot time If you like, you can also start kudzu while Red Hat Linux is running In either case, here is what kudzu does: It checks the hardware connected to your computer It compares the hardware it finds to the database of hardware information stored in the /etc/sysconfig/hwconf file It prompts you to change your system configuration, based on new or removed hardware that was detected Bài giảng môn học Quảng Trị Mạng Khoa Công nghệ Thông tin Trường Đại học Nông lâm TP Hồ Chí Minh Managing File Systems and Disk Space • Adding a hard disk 1.Install the hard disk hardware 2.Identify the partitions on the new hard disk 3.Create the file systems on the new hard disk 4.Mount the file systems • Displaying system space with df • Checking disk usage with du • Finding disk consumption with find Bài giảng môn học Quảng Trị Mạng 10