成人免费xxxxx在线视频软件_久久精品久久久_亚洲国产精品久久久_天天色天天色_亚洲人成一区_欧美一级欧美三级在线观看

Linux 中永久安全地刪除“文件和目錄”的三種方法

系統(tǒng) Linux
在本文中,我們分享一些用于在 Linux 中永久安全地刪除文件的命令行工具。

概述

在大多數(shù)情況下,我們在linux中刪除文件和目錄是通過rm命令,這些方法并不能永久、安全地從硬盤(或任何存儲介質(zhì))中刪除文件。

假設(shè)文件包含機密或機密內(nèi)容,例如系統(tǒng)的用戶名和密碼,攻擊者可以輕松恢復(fù)文件的已刪除副本并訪問這些文件 。

在本文中,我們分享一些用于在 Linux 中永久安全地刪除文件的命令行工具。

一、Shred -覆蓋文件以隱藏內(nèi)容

1、安裝軟件包

yum install coreutils-8.22-24.el7_9.2.x86_64 -y

2、命令及參數(shù)選項

[root@192_168_209_128 ~]# shred --help
Usage: shred [OPTION]... FILE...
Overwrite the specified FILE(s) repeatedly, in order to make it harder
for even very expensive hardware probing to recover the data.
Mandatory arguments to long options are mandatory for short options too.
-f, --force change permissions to allow writing if necessary
-n, --iterations=N overwrite N times instead of the default (3)
--random-source=FILE get random bytes from FILE
-s, --size=N shred this many bytes (suffixes like K, M, G accepted)
-u, --remove[=HOW] truncate and remove file after overwriting; See below
-v, --verbose show progress
-x, --exact do not round file sizes up to the next full block;
this is the default for non-regular files
-z, --zero add a final overwrite with zeros to hide shredding
--help display this help and exit
--version output version information and exit

選項說明:

  • -z- 添加一個帶有零的最終覆蓋以隱藏切碎。
  • -v– 可以顯示操作進度。
  • -u- 覆蓋后截斷和刪除文件。
  • -n– 指定覆蓋文件內(nèi)容的次數(shù)(默認為 3)。

3、示例

shred覆蓋文件以隱藏其內(nèi)容,也可以選擇刪除它。

$ shred -zvu -n  5 passwords.list

二、Wipe —在 Linux 中安全擦除文件

Linux wipe命令可以安全地從磁存儲器中擦除文件,從而無法恢復(fù)。

1、安裝軟件包

首先,您需要安裝擦除工具,運行下面的相應(yīng)命令:

$ sudo yum install wipe       [On RedHat based systems]

2、命令及參數(shù)選項

$wipe --help

選項:

  • -r- 告訴擦除遞歸到子目錄
  • -f- 啟用強制刪除和禁用確認
  • -i- 顯示刪除過程的進度

3、示例

以下命令將銷毀目錄private下的所有內(nèi)容。

$ wipe -rfi private/*

三、Linux 安全刪除工具包

Secure-delete是一個安全文件刪除工具的集合,其中包含srm (secure_deletion) 工具,用于安全刪除文件。

1、安裝軟件包

首先,您需要使用以下相關(guān)命令安裝它:

$ sudo yum install secure-delete [On RedHat based systems]

2、命令及參數(shù)選項

$[root@192_168_209_128]# srm --help
Usage: srm [OPTION]... [FILE]...
Overwrite and remove (unlink) the files. By default use the 35-pass Gutmann
method to overwrite files.
-d, --directory ignored (for compatability with rm(1))
-f, --force ignore nonexistant files, never prompt
-i, --interactive prompt before any removal
-x, --one-file-system do not cross file system boundaries
-s, --simple overwrite with single pass using 0x00 (default)
-P, --openbsd overwrite with three passes like OpenBSD rm
-D, --dod overwrite with 7 US DoD compliant passes
-E, --doe overwrite with 3 US DoE compliant passes
-G, --gutmann overwrite with 35-pass Gutmann method
-C, --rcmp overwrite with Royal Canadian Mounted Police passes
-r, -R, --recursive remove the contents of directories
-v, --verbose explain what is being done
-h, --help display this help and exit
-V, --version display version information and exit

選項:

  • -f - 強制刪除
  • -r - 遞歸刪除,刪除目錄及目錄中的內(nèi)容
  • -v – 啟用詳細模式
  • -z– 用零而不是隨機數(shù)據(jù)擦除最后一次寫入

3、示例

您可以使用srm工具在 Linux 系統(tǒng)上安全地刪除文件或目錄,如下所示。

$ srm -vz private/*

[

責(zé)任編輯:姜華 來源: 今日頭條
相關(guān)推薦

2017-03-14 09:45:24

2017-06-09 13:51:42

Linux命令刪除文件

2022-05-31 16:00:46

Go 編程語言復(fù)制文件Go 標(biāo)準(zhǔn)庫

2019-04-11 08:00:00

Windows刪除文件

2022-01-20 09:58:44

Python元素列表

2010-11-10 13:28:06

SQL Server刪

2016-10-12 13:53:38

JavaByteBufferRandomAcces

2021-12-20 07:11:26

Java List排序 Java 基礎(chǔ)

2010-09-08 13:29:48

CSS

2009-07-08 12:56:32

編寫Servlet

2022-11-18 15:09:29

2022-05-30 07:07:35

Java監(jiān)聽文件Java 8

2022-08-19 11:17:09

Linux

2016-11-15 09:27:37

Linux刪除文件

2023-02-24 16:45:02

2010-09-14 15:10:49

CSS注釋

2009-12-11 18:49:39

預(yù)算編制博科資訊

2022-07-13 16:06:16

Python參數(shù)代碼

2024-11-15 07:00:00

Python發(fā)送郵件

2011-04-18 15:32:45

游戲測試測試方法軟件測試
點贊
收藏

51CTO技術(shù)棧公眾號

主站蜘蛛池模板: 欧美黄页| 4hu最新网址 | 盗摄精品av一区二区三区 | 欧美二区在线 | 久久一区二区视频 | 国产免费va| 粉嫩av在线 | 久久综合九九 | 神马久久久久久久久久 | 天天干亚洲| 黄色在线免费观看 | 国产福利资源在线 | 水蜜桃亚洲一二三四在线 | 日韩成人高清在线 | 龙珠z国语版在线观看 | 国产成人精品一区二区 | 91麻豆蜜桃一区二区三区 | 国产欧美精品区一区二区三区 | 国产视频二区在线观看 | 欧美在线观看一区 | 欧洲视频一区二区 | 久草视频在线播放 | 中文字幕在线电影观看 | 二区三区av | 五十女人一级毛片 | 99re在线视频观看 | 久久久久国产一区二区三区四区 | 日韩欧美操| 精品国产91 | 欧美日韩成人 | 欧美日韩a | 成人永久免费 | 亚洲精品www. | sese视频在线观看 | 精品欧美一区二区三区精品久久 | 亚洲国产一区二区三区, | 一级毛片大全免费播放 | 国产精品视频久久久久 | 久久精品97| 日韩网站在线 | 亚洲日韩中文字幕一区 |