Remember to maintain security and privacy. Do not share sensitive information. Procedimento.com.br may make mistakes. Verify important information. Termo de Responsabilidade
Secure deletion of files is a critical aspect of data security, ensuring that sensitive information cannot be recovered once it has been deleted. In the Apple environment, particularly on macOS, there are several methods to achieve secure deletion. This article will explore these methods, explain their importance, and provide practical examples to help you implement secure deletion on your macOS system.
Secure deletion is essential for protecting personal data, confidential business information, and any other sensitive files from unauthorized recovery. When you delete a file normally, the data is not immediately removed from the disk; instead, the space it occupies is marked as available for new data. Until it is overwritten, the original data can be recovered using various tools. Secure deletion ensures that the data is overwritten in such a way that recovery is extremely difficult, if not impossible.
Examples:
Using the srm
Command:
The srm
(secure remove) command is a built-in utility in macOS that securely deletes files by overwriting their data. Here's how to use it:
srm -v <file_path>
-v
enables verbose mode, which provides feedback on the deletion process.<file_path>
is the path to the file you want to securely delete.Example:
srm -v /Users/username/Documents/sensitive_file.txt
Using the shred
Command:
Although shred
is not included by default in macOS, it can be installed via Homebrew, a popular package manager for macOS. First, install Homebrew if you haven't already:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Then, install shred
:
brew install coreutils
Once installed, you can use shred
to securely delete files:
gshred -v -n 3 -z <file_path>
-v
enables verbose mode.-n 3
specifies the number of overwrite passes (3 in this case).-z
adds a final overwrite with zeros to hide shredding.Example:
gshred -v -n 3 -z /Users/username/Documents/sensitive_file.txt
Using Disk Utility for Secure Erase of Free Space:
If you want to ensure that previously deleted files cannot be recovered, you can securely erase the free space on your disk using Disk Utility: