lkml.org 
[lkml]   [2002]   [Jan]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: Usage of filetype
From
Date
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/

\
 
 \ /
  Last update: 2005-03-22 13:15    [W:0.018 / U:1.992 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site