Bug 18776

Summary: [PATCH] Add rm -P functionality to mv
Product: Base System Reporter: ajk <ajk>
Component: binAssignee: freebsd-bugs (Nobody) <bugs>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 5.0-CURRENT   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff none

Description ajk 2000-05-23 17:30:01 UTC
Add a -P option to the mv command to overwrite the source files
before deleting them when moving across a filesystem boundary.  As
with the rm command, files are overwritten three times, first with
the byte pattern 0xff, then 0x00, and then 0xff again, before they
are deleted.

Note that only source files are overwritten.  We could overwrite
to-be-clobbered destination files as well, but we would have to
change the cp command, which already has a -P option.  Discussion?

Fix: This patch breaks out the rm_overwrite() function from rm.c, renaming
it obliterate(), and makes the necessary changes for both commands
to call obliterate().
How-To-Repeat: 
Apply the patch below.
Comment 1 iedowse freebsd_committer freebsd_triage 2002-12-01 01:07:27 UTC
State Changed
From-To: open->closed


Sorry, there hasn't been any interest in adding this feature, and 
it is of very marginal use anyway.