2

I just created a file:

touch myFile

Made it "undeletable":

chattr +u myFile

and removed it:

rm myfile

How can I get it back? What is the purpose of "u"? Is it used?

  • What filesystem are you using? – schaiba Mar 4 '13 at 21:34
  • According to df -T: ext4 – Martin Thoma Mar 4 '13 at 21:40
  • 1
    I find the increasing tendency to just ask than to think for one minute and enter "chattr +u" into google and just read one of the results, any of them. They all tell you: the ext filesystems don't honor that flag. If you are using another filesystem there is a big chance that searching for "chattr +u <your_fs_name>" will give you an anwer. Just wanted to note that ... – Bananguin Mar 4 '13 at 21:45
  • The manual says "The c', 's', and u' attributes are not honored by the ext2 and ext3 filesystems as implemented in the current mainline Linux kernels." At least that's the manual page on my Arch system. – schaiba Mar 4 '13 at 21:48
3

From the chattr man page:

The 'c', 's', and 'u' attributes are not honored by the ext2 and ext3 filesystems as implemented in the current mainline Linux kernels. These attributes may be implemented in future versions of the ext2 and ext3 filesystems.

This is present in the July 2012 version of the man page, so I suspect the same is true for ext4. My guess is that someone (the chattr developer?) either experimented or planned to experiment with these features, but they were never stable or complete enough for the mainline kernel.

Pity; I'd appreciate a +s.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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