Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

srm (Unix)

From Wikipedia, the free encyclopedia
icon
This articleneeds additional citations forverification. Please helpimprove this article byadding citations to reliable sources. Unsourced material may be challenged and removed.
Find sources: "Srm" Unix – news ·newspapers ·books ·scholar ·JSTOR
(August 2010) (Learn how and when to remove this message)
Secure Remove
srm securely erasing a text file.
Websitesrm.sourceforge.net Edit this on Wikidata
Repository


srm (orSecure Remove) is acommand line utility forUnix-like computer systems for securefile deletion. srm removes each specified file by overwriting, renaming, and truncating it before unlinking. This prevents other people from undeleting or recovering any information about the file from the command line.

Platform-specific behaviours and bugs

[edit]

Filesystems with hard links

[edit]

Attempting to secure delete a file with multiplehard links results in a warning from srm stating that the current access path has been unlinked, but the data itself was not overwritten or truncated. This is an undocumented feature of srm 1.2.8 onMac OS X 10.9,[1] and is erroneously documented in 1.2.11 as a behaviour activated by the OpenBSD rm-compatible option-P.[2] However, in both the OS X and SourceForge srm implementations, the behaviour of unlinking but not overwriting multi-linked files is always active, as long as the platform reports hard links.[3][4]

srm 1.2.8 onMac OS X 10.9[5] has a-n option, which means "overwrite file, but do not rename or unlink it."[1] However, if the file has multiple links, the multiple-link file data protection feature activates first, removing the file, even though the-n option specifies "do not rename or unlink the file".[3] The-n option has been removed from the code and manual of srm version 1.2.11, the latestSourceForge.net version. As a consequence, this option/feature conflict does not occur.[2][6]

OS X

[edit]

A number of file systems supportfile forks (calledresource forks and named forks on OS X (particularlyHFS+), and alternate data streams onNTFS), orextended attributes. However, OS X is the only platform on which srm securely deletes any of this additional data in files.[7]On OS X, only the most common non-data fork, the resource fork, is handled in this way.[3] This support was included in Apple’ssrm 1.2.8 [5][8] and SourceForge'ssrm 1.2.9.[9]

srm was removed from OS X/macOS in v10.11 El Capitan, as part of the removal of the "Secure Empty Trash" feature for security reasons.[10]

OpenBSD

[edit]

In srm 1.2.11, released on 25 November 2010,[11] theOpenBSD rm-compatible option,-P, is documented have an overwriting pattern matching OpenBSD's rm.[2] Additional functionality which protects multi-linked files is documented under the OpenBSD-compatible option, but is actually always active.[2][3][4]

Windows

[edit]

When securely deleting files recursively, srm 1.2.11 is unable to determine device boundaries on Windows. Therefore, the-x option, which restricts srm to onefile system, is not supported.[2]

See also

[edit]

References

[edit]
  1. ^abdoj, null_pointer atSourceForge (20 September 2004)."srm - securely remove files or directories".srm 1.2.8, OS X Version 10.9. Man Pages Section 1: Tools:Apple Inc. Retrieved7 January 2014.{{cite web}}: CS1 maint: location (link)
  2. ^abcdeMatt Gauthier."srm - securely remove files or directories".srm 1.2.11. Man Pages Section 1: Tools. Retrieved7 January 2014.{{cite web}}: CS1 maint: location (link)
  3. ^abcdApple Inc., Matt Gauthier."sunlink function in srm sunlink.c (OS X)"(C Source).Darwin 13.0, OS X Version 10.9: Apple srm 7.Apple Inc. Retrieved7 January 2014.
  4. ^abdoj, null_pointer at SourceForge (24 December 2013)."sunlink function in srm sunlink.c (SourceForge)"(C Source).srm 1.2.11, sunlink.c CVS 1.44.SourceForge.net. Retrieved7 January 2014.
  5. ^abApple Inc."Apple - Open Source".Darwin 13.0, OS X Version 10.9.Apple Inc. Retrieved7 January 2014.
  6. ^doj, null_pointer at SourceForge (9 June 2011)."srm main.c"(C Source).srm 1.2.11, main.c CVS 1.16.SourceForge.net. Retrieved7 January 2014.
  7. ^doj, null_pointer at SourceForge (24 December 2013)."srm TODO"(Plain Text).srm 1.2.11, TODO CVS 1.34.SourceForge.net. Retrieved7 January 2014.
  8. ^doj, null_pointer at SourceForge (22 November 2010)."srm README.OsX (sic)"(Plain Text).srm 1.2.11, README.OsX (sic) CVS 1.2.SourceForge.net. Retrieved7 January 2014.
  9. ^doj, null_pointer at SourceForge (25 November 2010)."srm ChangeLog 2008-07-08"(Plain Text).srm 1.2.11, ChangeLog CVS 1.4.SourceForge.net. Retrieved7 January 2014.
  10. ^"macbook pro - macOS High Sierra: Where is the Secure Empty Trash option? - Ask Different". Retrieved28 March 2021.
  11. ^doj, null_pointer at SourceForge."secure rm - Browse files at SourceForge.net".SourceForge.net. Retrieved7 January 2014.

External links

[edit]
Retrieved from "https://en.wikipedia.org/w/index.php?title=Srm_(Unix)&oldid=1305277915"
Categories:
Hidden categories:

[8]ページ先頭

©2009-2026 Movatter.jp