1 / 19

UNIX File System

UNIX File System. by Tero Toikkanen, CAP02S. UNIX. Multi-user system Multi-tasking system Wide selection of tools for software development Open architecture. Some UNIX variants. LINUX (Caldera, Debian, Mandrake, RedHat, Slackware, SuSE...). BSD (FreeBSD, NetBSD, OpenBSD). HP-UX.

ernie
Télécharger la présentation

UNIX File System

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. UNIX File System by Tero Toikkanen, CAP02S

  2. UNIX • Multi-user system • Multi-tasking system • Wide selection of tools for software development • Open architecture

  3. Some UNIX variants • LINUX (Caldera, Debian, Mandrake, RedHat, Slackware, SuSE...) • BSD (FreeBSD, NetBSD, OpenBSD) • HP-UX • Solaris • IRIX • Compaq Tru64 UNIX (discontinued)

  4. KISS • The general principle: ”Keep It Simple, Stupid” • Programs perform one well defined task properly • Almost all data is presented as text • Programs can be combined like LEGO-blocks

  5. RTFM • Learn to use the documentation • manand infocommands • Internet resources • Website of the variant or distribution • HOW-TO’s • Tutorials

  6. The Basics of UNIX File system • Hierarchical tree -structure • File-spesific security rights • Files may be shared • Almost everything can be considered to be a file, so a file can contain anything • Even directories are files, they just contain a list of other files • Case-sensitive file names

  7. Mounting • All UNIX systems usually have at least one permanent non-removable hard disk system. The root directory and the directories below it are stored on this disk. Its structure is known as the root file system. • If an additional hard disk is added, UNIX creates a separate new filesystem on this disk. Before it can be used, it must be attached to the root file system. This is called mounting an additional filesystem.

  8. Mounting example 1

  9. Mounting example 2 Filesystem blocks Used Available Mounted on /dev/hda8 995115 598998 344711 / /dev/hda10 2974518 2714151 106547 /usr /dev/hda9 995115 174404 769305 /home /dev/hda1 52653 2511 47333 /boot /dev/hdb6 3935495 3051510 680363 /scratch /dev/hdb7 1717427 2076 1626594 /tmp /dev/fd0 1423 288 1135 /floppy

  10. File types • A file can be e.g.: • Text file • Data file • Source Code file • Executable file • Shell program • Link • Device file

  11. file-command • Used to determine file type • Usage: • file file • e.g: • file * • file /dev/hda1 • Output examples • ASCII text • c program text • character special(Device file)

  12. cd,ls- and pwd-commands cd cd ~ ls ls -a ls -l la -p pwd

  13. Root-directory / /dev /net /etc /opt /export /sbin /home /stand /kernel /tmp /lost+found /usr /mnt /var

  14. Security rights • Example file -rwxr-x--- 1 ex1 users 512 Sep 11 10:28 a.ps File type indicatior | Permissions for file owner | | Permission for group members | | | Permissions for others | | | | - rwx r-x ---

  15. File tools • rm - remove file (or directory) • cp - copy file to another location • mv - move file to another location • mkdir - create new directory • rmdir - remove directory

  16. ch-commands • chmod • Change permission mode for file • chown • Change owner for file • chgrp • Change group for file

  17. chmod • Usage: • chmod o+r datafiles chmod [augo][+-=][rwx] file

  18. cat and more • cat - Display, combine, append, copy, or create files • Usage: cat [option] file • more - Display all or parts of a file one screen at a time • Usage: more [option] file

  19. More info • http://cit.evitech.fi/unix/ostart.htm

More Related