I am trying to hide one new file from a script that contains 'sudo rm -rf *
' - I am wondering if I can do this without redoing the script/ if this is possible or not.
I have tried the following:
$ sudo chattr +i file.txt
and
$ sudo chattr +a file.txt
The later is closer to the functionality I am looking for i.e. +a
These work, however, they are not skipped during my script, rather immediately it errors Operation not permitted...
and doesn't remove any others.
..My desired result would be for it to be completely hidden or skipped from sudo rm -rf *
rm -rf *
component. – Chris Davies Mar 30 '20 at 16:53