Presentation is loading. Please wait.

Presentation is loading. Please wait.

1.1 Fichiers et systèmes de fichiers Fichiers et Systèmes de fichiers.

Similar presentations


Presentation on theme: "1.1 Fichiers et systèmes de fichiers Fichiers et Systèmes de fichiers."— Presentation transcript:

1 1.1 Fichiers et systèmes de fichiers Fichiers et Systèmes de fichiers

2 1.2 Fichiers et systèmes de fichiers Lister les numéros d ’inode alpha12.couveep$ ls -il total 5896 2090 -rwxr-xr-x 1 couveep frec 657 Jan 10 2000 Approve 2072 -rwxr--r-- 1 couveep frec 36 Jun 26 1996 colog 2073 -rwxr-xr-x 1 couveep frec 501 Feb 05 1997 escale 2074 -rw-r--r-- 1 couveep frec 2967138 Nov 21 1997 gsv22w32.exe 2071 -rwxr--r-- 1 couveep frec 85 Mar 05 1998 infoServer 2078 -rwxr-xr-x 1 couveep frec 95 Mar 17 1998 lanoffice 2077 -rwxr-xr-x 1 couveep frec 423 Feb 10 1998 wnc2checkb 2075 -rwxr-xr-x 1 couveep frec 646 Feb 10 1998 wnc2doc 2076 -rwxr-xr-x 1 couveep frec 1070 Feb 10 1998 wnc2waitb 2079 -rwxr-xr-x 1 couveep frec 9164 Mar 27 12:55 xd 2070 -rwxr--r-- 1 couveep frec 73 Apr 17 1997 xemacs

3 1.3 Fichiers et systèmes de fichiers Fichier de type répertoire alpha12.couveep$ xd. 00000000: 08152E00 00000000 00000000 00000000................ 00000010: 00022E2E 00000000 00000000 00000000................ 00000020: 08167865 6D616373 00000000 00000000..xemacs........ 00000030: 0817696E 666F5365 72766572 00000000..infoServer.... 00000040: 0818636F 6C6F6700 00000000 00000000..colog......... 00000050: 08196573 63616C65 00000000 00000000..escale........ 00000060: 081A6773 76323277 33322E65 78650000..gsv22w32.exe.. 00000070: 081B776E 6332646F 63000000 00000000..wnc2doc....... 00000080: 081C776E 63327761 69746200 00000000..wnc2waitb..... 00000090: 081D776E 63326368 65636B62 00000000..wnc2checkb.... 000000A0: 081E6C61 6E6F6666 69636500 00000000..lanoffice..... 000000B0: 081F7864 00000000 00000000 00000000..xd............ 000000C0: 082A4170 70726F76 65000000 00000000.*Approve.......

4 1.4 Fichiers et systèmes de fichiers Lien sur un fichier alpha12.couveep$ ln xd hexadump alpha12.couveep$ ls -il total 5920 2090 -rwxr-xr-x 1 couveep frec 657 Jan 10 2000 Approve 2072 -rwxr--r-- 1 couveep frec 36 Jun 26 1996 colog 2073 -rwxr-xr-x 1 couveep frec 501 Feb 05 1997 escale 2074 -rw-r--r-- 1 couveep frec 2967138 Nov 21 1997 gsv22w32.exe 2079 -rwxr-xr-x 2 couveep frec 9164 Mar 27 12:55 hexadump 2071 -rwxr--r-- 1 couveep frec 85 Mar 05 1998 infoServer 2078 -rwxr-xr-x 1 couveep frec 95 Mar 17 1998 lanoffice 2077 -rwxr-xr-x 1 couveep frec 423 Feb 10 1998 wnc2checkb 2075 -rwxr-xr-x 1 couveep frec 646 Feb 10 1998 wnc2doc 2076 -rwxr-xr-x 1 couveep frec 1070 Feb 10 1998 wnc2waitb 2079 -rwxr-xr-x 2 couveep frec 9164 Mar 27 12:55 xd 2070 -rwxr--r-- 1 couveep frec 73 Apr 17 1997 xemacs

5 1.5 Fichiers et systèmes de fichiers Contenu du répertoire alpha12.couveep$ xd -c. 00000000: 08 15 2E 00 00 00 00 00 00 00 00 00 00 00 00 00................ 00000010: 00 02 2E 2E 00 00 00 00 00 00 00 00 00 00 00 00................ 00000020: 08 16 78 65 6D 61 63 73 00 00 00 00 00 00 00 00..xemacs........ 00000030: 08 17 69 6E 66 6F 53 65 72 76 65 72 00 00 00 00..infoServer.... 00000040: 08 18 63 6F 6C 6F 67 00 00 00 00 00 00 00 00 00..colog......... 00000050: 08 19 65 73 63 61 6C 65 00 00 00 00 00 00 00 00..escale........ 00000060: 08 1A 67 73 76 32 32 77 33 32 2E 65 78 65 00 00..gsv22w32.exe.. 00000070: 08 1B 77 6E 63 32 64 6F 63 00 00 00 00 00 00 00..wnc2doc....... 00000080: 08 1C 77 6E 63 32 77 61 69 74 62 00 00 00 00 00..wnc2waitb..... 00000090: 08 1D 77 6E 63 32 63 68 65 63 6B 62 00 00 00 00..wnc2checkb.... 000000A0: 08 1E 6C 61 6E 6F 66 66 69 63 65 00 00 00 00 00..lanoffice..... 000000B0: 08 1F 78 64 00 00 00 00 00 00 00 00 00 00 00 00..xd............ 000000C0: 08 2A 41 70 70 72 6F 76 65 00 00 00 00 00 00 00.*Approve....... 000000D0: 08 1F 68 65 78 61 64 75 6D 70 00 00 00 00 00 00..hexadump......

6 1.6 Fichiers et systèmes de fichiers Création d’un système de fichiers alpha12.couveep$ man mkfs mkfs Command Purpose Makes a file system. Syntax mkfs [ -b Boot ] [ -l Label ] [ -i i-Nodes ] [ -o Options ] [ -p Prototype ] [-s Size ] [ - v VolumeLabel ] [ -V VfsName ] Device Description The mkfs command makes a new file system on a specified device. The mkfs command initializes the volume label, file system label, and startup block. dev Device name -v vol Volume ID -s size File system size -b boot Program to be installed in the startup block -V vfs Definition of the virtual file system -b Boot Names the program to be installed in block 0 of the new file system. -i i-Nodes Specifies the initial number of i-nodes on the file system. -l Label Specifies the file system label for the new file system. -o Options Specifies a comma-separated list of virtual file system implementation-specific options.

7 1.7 Fichiers et systèmes de fichiers Sous Windows

8 1.8 Fichiers et systèmes de fichiers Le même sous UNIX...

9 1.9 Fichiers et systèmes de fichiers Le lien symbolique alpha12.couveep$ ln -s /tmp/toto tata alpha12.couveep$ ls -il total 5896 2090 -rwxr-xr-x 1 couveep frec 657 Jan 10 2000 Approve 2072 -rwxr--r-- 1 couveep frec 36 Jun 26 1996 colog 2073 -rwxr-xr-x 1 couveep frec 501 Feb 05 1997 escale 2074 -rw-r--r-- 1 couveep frec 2967138 Nov 21 1997 gsv22w32.exe 2071 -rwxr--r-- 1 couveep frec 85 Mar 05 1998 infoServer 2078 -rwxr-xr-x 1 couveep frec 95 Mar 17 1998 lanoffice 2091 lrwxrwxrwx 1 couveep frec 9 Mar 27 14:12 tata -> /tmp/toto 2077 -rwxr-xr-x 1 couveep frec 423 Feb 10 1998 wnc2checkb 2075 -rwxr-xr-x 1 couveep frec 646 Feb 10 1998 wnc2doc 2076 -rwxr-xr-x 1 couveep frec 1070 Feb 10 1998 wnc2waitb 2079 -rwxr-xr-x 1 couveep frec 9164 Mar 27 12:55 xd 2070 -rwxr--r-- 1 couveep frec 73 Apr 17 1997 xemacs alpha12.couveep$ ls -il /tmp/toto 62 -rw-r--r-- 1 couveep frec 5 Mar 27 14:12 /tmp/toto alpha12.couveep$ xd -b tata 00000000: 74 6F 74 6F 0A titi.

10 1.10 Fichiers et systèmes de fichiers Structure buf struct buf { /* buffer header */ __long64_t b_flags; /* flag word (see defines below) */ #define B_WRITE (long)0x0000 /* non-read pseudo-flag */ #define B_READ (long)0x0001 /* read when I/O occurs */ #define B_DONE (long)0x0002 /* I/O complete */ #define B_ERROR (long)0x0004 /* error detected */ #define B_BUSY (long)0x0008 /* in use or I/O in progress */ struct buf *b_forw; /* hash list forward link */ struct buf *b_back; /* hash list backward link */ struct buf *av_forw; /* free list forward link */ struct buf *av_back; /* free list backward link */ void (*b_iodone)(); /* ptr to iodone routine */ struct vnode *b_vp; /* vnode associated with block */ dev_t b_dev; /* major+minor device name */ daddr_t b_blkno; /* block # on device or in file */ caddr_t b_addr; /* buffer address */ __ulong64_t b_bcount; /* transfer count, OR */ /* #blks in list (bfreelist only) */ char b_error; /* returned after I/O */ __ulong64_t b_resid; /* words not xferred after error */ __long64_t b_work; /* work area for device drivers */ tid_t b_event; /* anchor for event list */ struct timestruc_t b_start; /* request start time */ }

11 1.11 Fichiers et systèmes de fichiers Mesure du temps d’exécution # time find /usr -type f -print > /dev/null real 0m18.94s user 0m0.29s sys 0m3.44s # # time find /usr -type f -print > /dev/null real 0m1.47s user 0m0.14s sys 0m1.32s #


Download ppt "1.1 Fichiers et systèmes de fichiers Fichiers et Systèmes de fichiers."

Similar presentations


Ads by Google