1 / 11

Fichiers et Systèmes de fichiers

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

tea
Download Presentation

Fichiers et Systèmes de fichiers

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. Fichiers et Systèmes de fichiers Fichiers et systèmes de fichiers

  2. 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 Fichiers et systèmes de fichiers

  3. 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....... Fichiers et systèmes de fichiers

  4. 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 Fichiers et systèmes de fichiers

  5. 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...... Fichiers et systèmes de fichiers

  6. 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. Fichiers et systèmes de fichiers

  7. Sous Windows Fichiers et systèmes de fichiers

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

  9. 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. Fichiers et systèmes de fichiers

  10. 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 */ } Fichiers et systèmes de fichiers

  11. 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 # Fichiers et systèmes de fichiers

More Related