Bash-Linux.com : Le SHELL pour les nuls

  Actuellement 50 lignes de commande et 1472 man disponibles
login as: root
root@213.186.33.18's password:
Last login: Mon May 28 21:40:56 2012 from 38.107.179.228
[root@bash-linux ~] # echo "Bienvenue sur Bash-Linux.com"_
 Manuel des commandes UNIX (man) Version anglaise

Indiquez la fonction :

Man Getdents en anglais

GETDENTS(2) Linux Programmer's Manual GETDENTS(2)
 
NAME


getdents - get directory entries
 
SYNOPSIS


#include #include #include #include #include int getdents(unsigned int fd, struct dirent *dirp, unsigned int count);
 
DESCRIPTION


This is not the function you are interested in. Look at readdir(3) for the POSIX conforming C library interface. This page documents the bare kernel system call interface. The system call getdents() reads several dirent structures from the directory referred to by the open file descriptor fd into the buffer pointed to by dirp. The argument count is the size of the memory area. The dirent structure is declared as follows: struct linux_dirent { unsigned long d_ino; /* Inode number */ unsigned long d_off; /* Offset to next dirent */ unsigned short d_reclen; /* Length of this dirent */ char d_name []; /* Filename (null-terminated) */ /* length is actually (d_reclen - 2 - offsetof(struct linux_dirent, d_name) */ char pad; /* Zero padding byte */ char d_type; /* File type (only since Linux 2.6.4; offset is (d_reclen - 1)) */ } d_ino is an inode number. d_off is the distance from the start of the directory to the start of the next dirent. d_reclen is the size of this entire dirent. d_name is a null-terminated filename. d_type is a byte at the end of the structure that indicates the file type. It contains one of the following values: DT_BLK This is a block device. DT_CHR This is a character device. DT_DIR This is a directory. DT_FIFO This is a named pipe (FIFO). DT_LNK This is a symbolic link. DT_REG This is a regular file. DT_SOCK This is a Unix domain socket. DT_UNKNOWN The file type is unknown.
 
RETURN VALUE


On success, the number of bytes read is returned. On end of directory, 0 is returned. On error, -1 is returned, and errno is set appropriately.
 
ERRORS


EBADF Invalid file descriptor fd. EFAULT Argument points outside the calling process's address space. EINVAL Result buffer is too small. ENOENT No such directory.
 
ENOTDIR


File descriptor does not refer to a directory.
 
CONFORMING TO


SVr4.
 
NOTES


Glibc does not provide a wrapper for this system call; call it using syscall(2). This call supersedes readdir(2).
 
SEE ALSO


readdir(2), readdir(3)
 
COLOPHON


This page is part of release 3.05 of the Linux man-pages project. A description of the project, and information about reporting bugs, can be found at http://www.kernel.org/doc/man-pages/. Linux 2008-06-22 GETDENTS(2)


 Dernières recherches
Man  en anglais Man getdents en anglaisMan  en français Man getdents en français
Man  en anglais Man getdelim en anglaisMan  en français Man getdelim en français
Man  en anglais Man getcpu en anglaisMan  en français Man getcpu en français
Man  en anglais Man getcontext en anglaisMan  en français Man getcontext en français
Man  en anglais Man getchar en anglaisMan  en français Man getchar en français
Man  en anglais Man getc_unlocked en anglaisMan  en français Man getc_unlocked en français
Man  en anglais Man get_thread_area en anglaisMan  en français Man get_thread_area en français
Man  en anglais Man get_mempolicy en anglaisMan  en français Man get_mempolicy en français
Man  en anglais Man get_current_dir_name en anglaisMan  en français Man get_current_dir_name en français
Man  en anglais Man get en anglaisMan  en français Man get en français
Man  en anglais Man genrsa en anglaisMan  en français Man genrsa en français
Man  en anglais Man loadkeys en anglaisMan  en français Man loadkeys en français
Man  en anglais Man generic en anglaisMan  en français Man generic en français
Man  en anglais Man gendsa en anglaisMan  en français Man gendsa en français
Man  en anglais Man fwscanf en anglaisMan  en français Man fwscanf en français

 Recherche

Dans ce moteur de recherche, vous pouvez taper directement votre besoin, en une phrase normale, humaine.
Exemple : vous cherchez comment remplacer un mot par un autre dans tous les fichiers d'un certain dossier. Vous pouvez écrire "Comment remplacer un mot par un autre dans tous les fichiers d'un dossier". Le moteur vous ramenera les résultats en fonction de leur pertinence.
Vous pouvez bien sûr ne chercher qu'un seul mot-clé, par exemple "find".
 Toutes les lignes de code
Par popularité
Par fonction
Recherche avancée
 Les logiciels SHELL/SSH
Putty
Astuces Bash
Faire du SHELL avec PHP!
 La doc officielle
Les man Linux en français
Les man Linux en anglais
 Proposer vos bash
Partagez vos lignes!
 Les requêtes
Déposer une requête
Voir/répondre à une requête
 Quelques sites interessants
Bons sites pour apprendre
 Rechercher