Home Tags About

Immutable file on Linux

14 May 2012
admin linux
  • To see if a file is an immutable file:

      # lsattr filename
      ----i--------  filename
    

    The letter ‘i’ means it’s a file with immutable attribute.

  • To make a file immutable:

      # chattr +i filename
    
  • To remove immutable attribute for a file:

      # chattr -i filename