Windows
 Computer >> コンピューター >  >> システム >> Windows

Linux でファイルを完全に削除する方法

Linux オペレーティング システムでは、削除されたファイルはゴミ箱に移動します。ゴミ箱を空にすると、ファイルはシステムから削除されます。ただし、回復ソフトウェアの需要が高まるにつれて、ゴミ箱から削除されたファイルはある程度まで回復できます。これは、ゴミ箱から削除されたファイルが完全に削除されることはなく、目に見えなくなったことを意味します。ファイルはまだハード ドライブのどこかに不必要なスペースを占有しており、新しいファイルが作成されてハード ドライブの同じセクターに保存されたときにのみ完全に削除されます。貴重なディスク スペースを回復し、ファイルの破損を回避するには、Linux 内のファイルを完全に削除することが重要です。

Linux オペレーティング システムでファイルを完全に削除するためのいくつかの手順を次に示します。

Linux オペレーティング システムと Ubuntu、Mint、Fedora などのいくつかの利用可能なディストリビューションに存在するバリエーションにより、Linux でファイルを削除する手順は異なる場合がありますが、ファイルとフォルダーを削除する基本的な概念は変わりません。ハードディスクをフォーマットせずに Linux でディレクトリを完全に削除できる最も一般的な手順は次のとおりです。

方法 1. ゴミ箱オプションを削除する

選択すると、ユーザーがファイルをゴミ箱に移動せずに Linux で直接削除できるようにするオプションがあります。このオプションの有効化は、Linux の種類によって異なりますが、この機能の背後で使用されるプロセスは、以下の 2 つのいずれかになります。

  • ゴミ箱の制限を減らす

Linux ディストリビューションが Dolphin ファイル マネージャーをサポートしている場合は、設定にアクセスし、[サイズ] というラベルの付いたボックスの横にチェックマークを付けて、パーセンテージ制限を最低値に設定します。これにより、設定されたサイズより大きいすべてのファイルがゴミ箱に保存されず、完全に削除されます。

Linux でファイルを完全に削除する方法

  • Linux で Nautilus または Nemo ファイル マネージャーを使用している場合は、[ファイル マネージャーの設定] で、[削除] キーが押されたときに [ごみ箱をバイパス] を有効にするオプションが表示されます。これにより、削除されたファイルがゴミ箱に移動されることはありません。

Linux でファイルを完全に削除する方法

方法 2. ファイルはいつでも細断処理できます

GNU Project によって開発された Shred は、Linux オペレーティング システムに組み込まれたプログラムであり、Linux 内のファイルを完全に削除するために使用できます。 Test using Shred という名前のドキュメント ファイルを削除するコマンド ラインは次のとおりです。

shred -uvz -n 2 Test.doc

「u」パラメータは、上書きする前にファイルを削除します。

「v」パラメータは詳細情報を表示します。

「z」パラメーターは、削除されたデータの回復の可能性を防ぎます。

「-n 2」パラメータは、追加のセキュリティのために追加のパスを指定します。

In case, there are multiple files in a folder by the name of Music and you want to delete all of them, then use this command:

shred -uvz -n 2 Music/*.*

The name of the folder is specified as Music and the Asterix with a period and followed by another Asterix specifies to delete a file in Linux irrespective of their name or extension.

Method 3. Use Wipe.

The Linux Software distribution centre will allow you to install Wipe on your Linux Distro. It is like Shred program and is easy to use. The command line for deleting a file through Wipe is:

wipe Music/song1.mp3

Wipe is more secure than Shred and this means it is time-consuming as well. It also requests a confirmation from the user. To quicken the process, use appropriate flags such as:

f:using this flag will remove the confirmation.

c:wipe the file despite permissions.

q:quicken the process by bypassing all the security passes.

r:delete from a folder in Linux.

The simple Wipe command with all the flags would now appear as:

wipe -rfcq Music/song1.mp3

Method 4. Use Secure Delete.

Another tool that ensures removal of data from a hard drive is SRM, which is bundled in the Secure Delete suite. It is a quite efficient and quick tool and can even delete a directory in Linux. The command to delete a file is:

SRM is one of the tools in the Secure Delete suite of tools that specializes in secure removal of data from your HDD. It’s held by many as the best tool for this job.

Srm Music/song1.mp3

Like Wipe, deleting a file by SRM is a time-consuming process and can be made aster using flags. Some important flags are:

z:your file will be deleted and overwritten by zeros replacing the file for extra security.

v:this flag will provide verbose information about the process.

r:this will enable the recursive mode for subfolders.

1:the number one. This will reduce the time taken to complete the process.

The new command would then be:

srm -rlvz Music/Song1.jpg

Method 5. Install Bleachbit (GUI)

Linux でファイルを完全に削除する方法

One of the best tools to find and delete unwanted files and even delete folders in Linux operating system is Bleachbit. It is known to free up space by securely erasing data that has not been used for a long time and can be used manually to target a few files that need to be deleted. It can be installed through the software centre by using the following command:

sudo apt install bleachbit

Once installed, run the interface and click on EDIT and choose Preferences. In the General Tab, there would be a list of different options. Place a checkmark in the box beside the option labelled as “Overwrite contents of files to prevent recovery”.

Next, to permanently delete a file on Linux, click File and choose Shred option. A prompt box will appear confirming your action. Click on Delete, and that will the last of the files selected.

The Final Word On Delete A File In Linux.

Although using a Linux operating system is a different experience, it is not difficult. All you must know the functions and features that are embedded in Linux. Being an Open-source, Linux has many options to do the same task, and these are some of the easy ones to delete a file in Linux permanently. Do subscribe to Systweak Blogs and our YouTube Channel for more tech-related updates.


  1. Yahoo アカウントを完全に削除する方法

    電子メール アカウントのチェックからソーシャル メディア フィードのスクロールまで、テクノロジは私たちの日常生活の重要な部分になっています。ではない? さて、電子メール アカウントに関して言えば、Yahoo は 1997 年に開始された、最も古いが最も人気のある電子メール サービスの 1 つです。初期のインターネット時代に、Yahoo は電子メール以外のさまざまなサービスを提供しました。たとえば、Yahoo Messenger、Web ポータル、Yahoo 検索、Yahoo Sports、 Yahoo ニュース、Yahoo ファイナンスなど。しかし、時間の経過とともに新しいメール サービス

  2. Windows 11 でフォルダまたはファイルを強制的に削除する方法

    Windows 11 からフォルダーまたはファイルを直接削除するのは非常に簡単ですが、削除できないフォルダーまたはファイルに遭遇することがあります。ただし、特定のファイルまたはフォルダーを削除するために従来の方法が機能しない場合があります。通常、ファイルを削除できない場合、「ファイルが使用中です」という警告が表示されます。これが重大な問題になる可能性がある場合でも、当社の救済策の 1 つが解決に役立つはずです。パニックにならない; Windows 11 でファイルを強制的に削除するには、いくつかの方法があります。 関連項目:Windows 11 でタスクバーのサイズと向きを変更する方法 Wi