'automated' wiping

ZIYAD A. M. AL-BATLY zamb at saudi.net.sa
Fri Jul 8 11:12:59 UTC 2005


On Fri, 2005-07-08 at 12:38 +0200, René L. Reingard wrote:
> Hi,
> this time is the first time i would like to automate something.
> i downloaded WIPE and to my feeling, it is nice.
> with wipe i can easily delete all files in a folder (as example ~/.Trash),  
> so that they cannot be discovered by any un-delete-system.
> rigth now i open the terminal and type in the command:
> 
> $ wipe /home/user/.Trash/*.* -f
> 
> i would like to know, how to make this into a file (script?) that does the  
> job when i just klick on the file icon.
> 
> anyone can help?
> 
> thanks so much,
> René
> 
WARNING:
        "wipe" does *NOT* work with "journal" file-systems (like ext3,
        reiserfs, xfs, and jfs to name a few) when the journal
        capability is turned-on!  So be warned!

Now, to answer your question:
      * Create a file and name it anything you want (I'll choose here to
        name it "wipe_Trash.sh").  Put the following in it:
                #!/bin/sh
                wipe -f -r -c "$HOME/.Trash/*"
      * Make it readable and executable, and not-writable by all users
        either from Nautilus or by issuing from a terminal:
                chmod 0555 wipe_Trash.sh
      * That's it!  You might want to copy it (using "sudo") to
        "/usr/local/bin" so that all users will have access to it.

Three more points:
     1. The above script will *fail* to handle any files/directories
        that are hidden (i.e. start with a dot like ".hidden_file")!
     2. "shred" which is included in almost all Linux distributions, can
        do the same thing as "wipe".  Though, "shred" can't handle
        directories and it fails to work properly with journal
        file-system just like "wipe".  See "man shred" for more
        information.
     3. [Off-Topic] In UNIX, "*.*" doesn't make much sense when
        referring to "all files".  Just one asterisk "*" is enough.


Ziyad.




More information about the ubuntu-users mailing list