Messages in this thread | | | Subject | Re: Usage of filetype | From | Andi Kleen <> | Date | 19 Jan 2002 21:45:57 +0100 |
| |
Hans-Joachim Baader <hjb@pro-linux.de> writes:
> in the tune2fs manual I found the ext2 option 'filetype'. A file type seems > to be an 8 bit number, defined in linux/dirent.h in struct dirent64. > However, I didn't find any further docs about it, and I don't know any > userspace tools to read/set it. Could anyone please point me to more info > (or explain if this feature has any use)?
It sets the d_type field in struct dirent on readdir. See /usr/include/dirent.h in glibc for a list of the types. It's useful to find out something about a file without reading its inode (=causing a slow seek of the hard disk). For example it can be used to optimize find(1) or ls(1).
-Andi - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |