0

I want to shred or secure delete big folder that have about 100 GB information and many files What command or tool can I use for this?

1 Answers1

0

The chattr command can be used to change a folder or files attributes.

So if you use

chattr -R +s the_big_folder

It will recursively add the secure delete attribute to all sub directorys and files. Which means that when you delete them they will be zero filled. Then, you just have to delete them using

rm -rf the_big_folder

Andrew
  • 797
  • Thanks. I have never hear about chattr command. Is your way secure? And Is there any way to recover files after use your way? I got this error after run chattr command chattr: Inappropriate ioctl for device while reading flags on /FOLDER/ – Saeidi Sharif Apr 30 '16 at 07:41
  • It is a zero fill, so it is secure and unrecoverable. The error you are getting will happen if you try to delete directories that are mount points for filesystems that exist only in ram. So try creating a new folder then make a file inside of it. Then try to secure delete it as the root user. – Andrew Apr 30 '16 at 09:33