bug-tar
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Cannot get immutable to work


From: mg
Subject: Cannot get immutable to work
Date: Wed, 08 Jun 2022 20:31:29 -0700

# Note: There is a typo in the online HTML manual; missing f after -c
# I tried the way I have always done "tar cf ..." and the way shown in the
# HTML manual.

mkdir t &&
    cd t &&
    echo foo > bar &&
    sudo chattr +i bar &&
    echo Can make bar immutable &&
    lsattr &&
    # sudo tar cf j.tar --xattrs --xattrs-include=user.* bar &&
    sudo tar --xattrs -cf j.tar bar &&
    mkdir t1 &&
    cd t1 &&
    echo "Cannot restore. Try 4 ways." &&
    sudo tar xf ../j.tar --xattrs --xattrs-include=user.* &&
    lsattr &&
    sudo tar xf ../j.tar --xattrs-include=user.* &&
    lsattr &&
    sudo tar xf ../j.tar --xattrs &&
    lsattr &&
    sudo tar xf ../j.tar &&
    lsattr
~          
As a general comment, I will note that if I do backup (-c) and restore (-x), I 
would expect there would be no differences. Why wouldn't you make that strategy 
the default?




reply via email to

[Prev in Thread] Current Thread [Next in Thread]