Can ‘nix handle NTFS ADS data streams?

Two-three years ago, I experimented (in Windows) with NTFS ADS meta-data (Alternate Data Streams). It seemed like an interesting idea, but it is certainly not “portable”.

Is there an NTFS-ADS aware tool which can read and/or write this ADS data?
Also, do any of the `nix commonly used/preferred file-syystems support similar secondary streams”?

Answers:

Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.

Method 1

The ntfs-3g FUSE driver (almost certainly the one you’re using if you’ve got read/write) talks ADS, but not by default (except on Linux apparently, where ADS are mapped to extended attributes by default).

From ntfs-3g’s man page:

Alternate Data Streams (ADS)

NTFS stores all data in streams. Every
file has exactly one unnamed data
stream and can have many named data
streams. The size of a file is the
size of its unnamed data stream. By
default, ntfs-3g will only read the
unnamed data stream.

By using the
options “streams_interface=windows”,
you will be able to read any named
data streams, simply by specifying the
stream’s name after a colon. For
example:

cat some.mp3:artist

Named data streams act like normal
files, so you can read from them,
write to them and even delete them
(using rm). You can list all the named
data streams a file has by getting the
“ntfs.streams.list” extended
attribute.

As for the flip-side of your question, the basic umbrella term for this extra metadata would be extended file attributes. The various unices and their filesystems have support for this kind of thing under various names: the ext* family and many other Linux fs’s call these xattrs.


All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x