Upload
randolf-davis
View
229
Download
0
Embed Size (px)
Citation preview
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
Filesystem
A method for storing and origanizing files on Linux/Unix
For example /
bin usr
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
File Tree
/bin /boot /dev /etc /home /lib /root /sbin /usr /usr/local /var /tmp /import
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
File Permission
ls -t -r –h setuid, setgid, sticky chown chgrp chmod
-rwxrwxrwx umask
Reference
LAH Ch 5: The Filesystem