-1

Wish a script which would delete cache content and remove additional files which have been downloaded via the internet and saved voluntarily by the user and files any thing other than those used by the OS in linux.

Need a command which could make the execution of the above script possible before the shut down command is passed .

THE COMPUTER SHOULD NEVER SHUT DOWN.

2
  • No static content is kept in swap space, hence you cannot "clear" it. And what cache do you mean - a lot of systems use that term.
    – new123456
    Jul 21, 2011 at 22:22
  • While the data in swap is not always static, it is data that is written to disk, which opens the opportunity for discovery. That data in swap could be anything from emails to temp copies of files that were being edited.
    – Xenoactive
    Jul 22, 2011 at 5:01

1 Answer 1

1

Look at the Secure Delete package from THC. It includes a command called sswap which can be used to wipe a swap device. Use the command in a shutdown script. You can find packages for most of the common Linux distros. Of course, you might also consider using encrypted swap devices. Otherwise, if your computer suddenly loses power, you lose the opportunity to cleanly wipe the swap device.

1
  • Encrypted swap is going to give you the most bang for your buck here - raw swap devices won't be accessible for forensic analysis from a running system unless an attacker can get root, which generally requires a reboot. rebooting loses the key, effectively making the contents of swap into random noise. That only leaves cold boot attacks to worry about, and there's nothing that can be done there except to reboot the system and allow it to come all the way back up, or to leave it powered down for sufficient time when leaving to make sure nobody can come behind you and extract data.
    – Stephanie
    Jul 22, 2011 at 5:11

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .