Removing all swap files?
If files "annoy" you because they contain confidential information, you should know that simply deleting files using a command rm
does not actually delete the data on your hard drive.
I'm not sure where your swap files are or what application is creating them. Usually, the paging files are created by the operating system in a specially designated folder. For example, on my Mac:
$ ls /private/var/vm/
-rw------T 1 root wheel 4294967296 Mar 15 19:41 sleepimage
-rw------- 1 root wheel 67108864 Mar 15 21:10 swapfile0
$
If you want to remove information in the paging files, you really need to overwrite them. You can do it with "dd", but you'd better do it with srm . Unfortunately, srm
by default it overwrites each file 7 times, which is 6 times more than necessary. (Use it with the -s option to get one rewrite).
So, if you want to use your find, use:
find . -iname "*swp*" -exec srm -s {} \;
Make sense?
a source to share