Can I set the “Archive” bit on a file on NTFS on Linux?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
0
down vote

favorite












On a NTFS file system, you can set the Archive bit for a file.



I can set the Archive bit for a file on a NTFS partition if I am using Windows, but say that I have a NTFS partition mounted on Linux, can I set the Archive bit for a file on Linux also?







share|improve this question






















  • To avoid being too broad, I’d suggest making this question specific to ntfs, so that answers could specify what features are currently enabled.
    – Jeff Schaller
    Apr 11 at 19:35














up vote
0
down vote

favorite












On a NTFS file system, you can set the Archive bit for a file.



I can set the Archive bit for a file on a NTFS partition if I am using Windows, but say that I have a NTFS partition mounted on Linux, can I set the Archive bit for a file on Linux also?







share|improve this question






















  • To avoid being too broad, I’d suggest making this question specific to ntfs, so that answers could specify what features are currently enabled.
    – Jeff Schaller
    Apr 11 at 19:35












up vote
0
down vote

favorite









up vote
0
down vote

favorite











On a NTFS file system, you can set the Archive bit for a file.



I can set the Archive bit for a file on a NTFS partition if I am using Windows, but say that I have a NTFS partition mounted on Linux, can I set the Archive bit for a file on Linux also?







share|improve this question














On a NTFS file system, you can set the Archive bit for a file.



I can set the Archive bit for a file on a NTFS partition if I am using Windows, but say that I have a NTFS partition mounted on Linux, can I set the Archive bit for a file on Linux also?









share|improve this question













share|improve this question




share|improve this question








edited Apr 11 at 19:44









Kusalananda

102k13199316




102k13199316










asked Apr 11 at 19:33









user285617

111




111











  • To avoid being too broad, I’d suggest making this question specific to ntfs, so that answers could specify what features are currently enabled.
    – Jeff Schaller
    Apr 11 at 19:35
















  • To avoid being too broad, I’d suggest making this question specific to ntfs, so that answers could specify what features are currently enabled.
    – Jeff Schaller
    Apr 11 at 19:35















To avoid being too broad, I’d suggest making this question specific to ntfs, so that answers could specify what features are currently enabled.
– Jeff Schaller
Apr 11 at 19:35




To avoid being too broad, I’d suggest making this question specific to ntfs, so that answers could specify what features are currently enabled.
– Jeff Schaller
Apr 11 at 19:35










1 Answer
1






active

oldest

votes

















up vote
2
down vote













The most popular tool, named ntfs-3g supports this capability. It's named NTFS attributes.



You should ensure setfattr (man 1 setfattr) is installed. NTFS attributes constitute two groups of attributes: system.ntfs_attrib (small-endian) and system.ntfs_attrib_be(big-endian). It's just for convenient usage.



Each attribute is presented by it's own HEX value (i.e. 0x20 for FILE_ATTRIBUTE_ARCHIVE). More info and values you can see at the official resource. NTFS attributes group consist of 4 bytes within that you can combine several attributes (Archive + System ...).



Display current NTFS attributes of test.file:



# Big-Endian
getfattr -h -e hex -n system.ntfs_attrib_be source-file


Set FILE_ATTRIBUTE_ARCHIVE for test.file:



# Big-Endian.
setfattr -h -v 0x00000020 -n system.ntfs_attrib_be target-file

# Little-Endian (in this manner in x86 family CPU bytes are stored.
# IMHO it's not very convenient for usage.
setfattr -h -v 0x20000000 -n system.ntfs_attrib target-file





share|improve this answer






















    Your Answer







    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "106"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    convertImagesToLinks: false,
    noModals: false,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );








     

    draft saved


    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f437126%2fcan-i-set-the-archive-bit-on-a-file-on-ntfs-on-linux%23new-answer', 'question_page');

    );

    Post as a guest






























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    2
    down vote













    The most popular tool, named ntfs-3g supports this capability. It's named NTFS attributes.



    You should ensure setfattr (man 1 setfattr) is installed. NTFS attributes constitute two groups of attributes: system.ntfs_attrib (small-endian) and system.ntfs_attrib_be(big-endian). It's just for convenient usage.



    Each attribute is presented by it's own HEX value (i.e. 0x20 for FILE_ATTRIBUTE_ARCHIVE). More info and values you can see at the official resource. NTFS attributes group consist of 4 bytes within that you can combine several attributes (Archive + System ...).



    Display current NTFS attributes of test.file:



    # Big-Endian
    getfattr -h -e hex -n system.ntfs_attrib_be source-file


    Set FILE_ATTRIBUTE_ARCHIVE for test.file:



    # Big-Endian.
    setfattr -h -v 0x00000020 -n system.ntfs_attrib_be target-file

    # Little-Endian (in this manner in x86 family CPU bytes are stored.
    # IMHO it's not very convenient for usage.
    setfattr -h -v 0x20000000 -n system.ntfs_attrib target-file





    share|improve this answer


























      up vote
      2
      down vote













      The most popular tool, named ntfs-3g supports this capability. It's named NTFS attributes.



      You should ensure setfattr (man 1 setfattr) is installed. NTFS attributes constitute two groups of attributes: system.ntfs_attrib (small-endian) and system.ntfs_attrib_be(big-endian). It's just for convenient usage.



      Each attribute is presented by it's own HEX value (i.e. 0x20 for FILE_ATTRIBUTE_ARCHIVE). More info and values you can see at the official resource. NTFS attributes group consist of 4 bytes within that you can combine several attributes (Archive + System ...).



      Display current NTFS attributes of test.file:



      # Big-Endian
      getfattr -h -e hex -n system.ntfs_attrib_be source-file


      Set FILE_ATTRIBUTE_ARCHIVE for test.file:



      # Big-Endian.
      setfattr -h -v 0x00000020 -n system.ntfs_attrib_be target-file

      # Little-Endian (in this manner in x86 family CPU bytes are stored.
      # IMHO it's not very convenient for usage.
      setfattr -h -v 0x20000000 -n system.ntfs_attrib target-file





      share|improve this answer
























        up vote
        2
        down vote










        up vote
        2
        down vote









        The most popular tool, named ntfs-3g supports this capability. It's named NTFS attributes.



        You should ensure setfattr (man 1 setfattr) is installed. NTFS attributes constitute two groups of attributes: system.ntfs_attrib (small-endian) and system.ntfs_attrib_be(big-endian). It's just for convenient usage.



        Each attribute is presented by it's own HEX value (i.e. 0x20 for FILE_ATTRIBUTE_ARCHIVE). More info and values you can see at the official resource. NTFS attributes group consist of 4 bytes within that you can combine several attributes (Archive + System ...).



        Display current NTFS attributes of test.file:



        # Big-Endian
        getfattr -h -e hex -n system.ntfs_attrib_be source-file


        Set FILE_ATTRIBUTE_ARCHIVE for test.file:



        # Big-Endian.
        setfattr -h -v 0x00000020 -n system.ntfs_attrib_be target-file

        # Little-Endian (in this manner in x86 family CPU bytes are stored.
        # IMHO it's not very convenient for usage.
        setfattr -h -v 0x20000000 -n system.ntfs_attrib target-file





        share|improve this answer














        The most popular tool, named ntfs-3g supports this capability. It's named NTFS attributes.



        You should ensure setfattr (man 1 setfattr) is installed. NTFS attributes constitute two groups of attributes: system.ntfs_attrib (small-endian) and system.ntfs_attrib_be(big-endian). It's just for convenient usage.



        Each attribute is presented by it's own HEX value (i.e. 0x20 for FILE_ATTRIBUTE_ARCHIVE). More info and values you can see at the official resource. NTFS attributes group consist of 4 bytes within that you can combine several attributes (Archive + System ...).



        Display current NTFS attributes of test.file:



        # Big-Endian
        getfattr -h -e hex -n system.ntfs_attrib_be source-file


        Set FILE_ATTRIBUTE_ARCHIVE for test.file:



        # Big-Endian.
        setfattr -h -v 0x00000020 -n system.ntfs_attrib_be target-file

        # Little-Endian (in this manner in x86 family CPU bytes are stored.
        # IMHO it's not very convenient for usage.
        setfattr -h -v 0x20000000 -n system.ntfs_attrib target-file






        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited Apr 11 at 20:49

























        answered Apr 11 at 20:42









        Yurij Goncharuk

        2,2582521




        2,2582521






















             

            draft saved


            draft discarded


























             


            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f437126%2fcan-i-set-the-archive-bit-on-a-file-on-ntfs-on-linux%23new-answer', 'question_page');

            );

            Post as a guest













































































            Popular posts from this blog

            Peggy Mitchell

            Palaiologos

            The Forum (Inglewood, California)