Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Tue 12 Dec 2017, 06:25
All times are UTC - 4
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Utilities
chattr
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [1 Post]  
Author Message
labbe5

Joined: 13 Nov 2013
Posts: 1028
Location: Canada

PostPosted: Tue 28 Feb 2017, 15:01    Post subject:  chattr
Subject description: preventing files and folders from being deleted with command lines
 

There is a way to prevent file and folder from being deleted.

in terminal :

Apply +i attribute to your file (i for immutable) :
sudo chattr +i file.txt

If you decide to remove your file :
sudo chattr -i file.txt

Similarly for folders :
sudo chattr -R +i dir1 (-R to make content immutable recursively)

Similarly to remove attributes :
sudo chattr -R -i dir1

Using chattr, you are sure never to delete a folder, or an important file, accidentally.

Notes :
man chattr will help you with file and folder attributes.
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [1 Post]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Utilities
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0341s ][ Queries: 13 (0.0115s) ][ GZIP on ]