Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Apple's HFS+ supports multiple forks such as the old data and resource forks. NTFS supports alternate data streams. I believe some *nix filesystems also have some support for multiple file forks or streams.

Given that directories (folders) are just a kind of file at the filesystem level, I'm wondering if any of the filesystems which support this feature support it for dirs as well as files? (Or indeed directories in the alternate forks / streams?)

I'm mostly asking out of curiosity rather than wanting to use such a feature. But one use it would have would be additional metadata for directories, which seems to be the most common use for these streams for files currently.

share|improve this question
NTFS supports Alternate Data Streams on directories. I don't know about the various Linux filesystems, though. – Andrew Lambert Dec 9 '12 at 2:48
@Amazed: If you could provide a reference in an answer I would accept it. – hippietrail Dec 9 '12 at 2:56
I don't have one handy, sorry. – Andrew Lambert Dec 9 '12 at 6:50
@Amazed: Well I eventually found this stated in a couple more places too, just none of them very official looking to link to from here ... – hippietrail Dec 9 '12 at 22:50

The ext2, ext3, ext4, JFS, ReiserFS, XFS, Btrfs and OCFS2 1.6 filesystems support extended attributes for a limited amount of metadata

In order to use them, the filesystems need to have xattrs enabled, for example:

mount /dev/sda1 /mountpoint -o user_xattr

Then you can set attributes:

setfattr -n "nameofmetadata" -v "valueofmetadata" /mountpoint/myfile

And get attributes:

getfattr /mountpoint/myfile
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.