9
Linux Filesystem WeeSan Lee

Linux Filesystem WeeSan Lee. Roadmap Disk Partitions The Filesystem Filesystem Mouting & Umounting File Tree File Type File Permission

Embed Size (px)

Citation preview

Page 1: Linux Filesystem WeeSan Lee. Roadmap Disk Partitions The Filesystem Filesystem Mouting & Umounting File Tree File Type File Permission

Linux Filesystem

WeeSan Lee

Page 2: Linux Filesystem WeeSan Lee. Roadmap Disk Partitions The Filesystem Filesystem Mouting & Umounting File Tree File Type File Permission

Roadmap

Disk Partitions The Filesystem Filesystem Mouting & Umounting File Tree File Type File Permission

Page 3: Linux Filesystem WeeSan Lee. Roadmap Disk Partitions The Filesystem Filesystem Mouting & Umounting File Tree File Type File Permission

Disk Partitions

Logical disk 4 primary partitions Can be extended by extended partition

To display $ fdisk –l

To partition $ fdisk /dev/sda m help p display partition info n new a partition d delete a partition l list known partition type t change partition id

Page 4: Linux Filesystem WeeSan Lee. Roadmap Disk Partitions The Filesystem Filesystem Mouting & Umounting File Tree File Type File Permission

Filesystem

A method for storing and origanizing files on Linux/Unix

For example /

bin usr

Page 5: Linux Filesystem WeeSan Lee. Roadmap Disk Partitions The Filesystem Filesystem Mouting & Umounting File Tree File Type File Permission

Filesystem Mouting & Umounting To mount a filesystem to a mount point

$ mount /dev/sda2 /import /etc/fstab

mount –a To umount a filesystem

$ umount /import To find who is using the resource

$ fuser –mv /mnt To find out what’s currently mounted

$ mount $ cat /etc/mtab

Page 6: Linux Filesystem WeeSan Lee. Roadmap Disk Partitions The Filesystem Filesystem Mouting & Umounting File Tree File Type File Permission

File Tree

/bin /boot /dev /etc /home /lib /root /sbin /usr /usr/local /var /tmp /import

Page 7: Linux Filesystem WeeSan Lee. Roadmap Disk Partitions The Filesystem Filesystem Mouting & Umounting File Tree File Type File Permission

File Type

7 types Regular file

$ find -print0 | xargs -0 rm $ find public_html -size +4M -print0 | xargs -0 ls -l

Directory . ..

Character device file Block device file Unix socket Name pipe Symbol link

$ ln -s old new

Page 8: Linux Filesystem WeeSan Lee. Roadmap Disk Partitions The Filesystem Filesystem Mouting & Umounting File Tree File Type File Permission

File Permission

ls -t -r –h setuid, setgid, sticky chown chgrp chmod

-rwxrwxrwx umask

Page 9: Linux Filesystem WeeSan Lee. Roadmap Disk Partitions The Filesystem Filesystem Mouting & Umounting File Tree File Type File Permission

Reference

LAH Ch 5: The Filesystem