Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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?

share|improve this question
    
What filesystem are you using? –  schaiba Mar 4 '13 at 21:34
    
According to df -T: ext4 –  moose Mar 4 '13 at 21:40
    
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
add comment

1 Answer

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.

share|improve this answer
add comment

Your Answer

 
discard

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.