Go Back   The macosxhints Forums > OS X Help Requests > UNIX - General



Reply
 
Thread Tools Rate Thread Display Modes
Old 03-29-2006, 11:58 PM   #1
GlowingApple
Major Leaguer
 
Join Date: Feb 2004
Location: Lincoln, NE
Posts: 278
rm -W

Hi, does anyone know how the -W flag works for rm? The man page specifies:

Code:
Attempt to undelete the named files.  Currently, this option can only be used to recover files covered by whiteouts.
I'm not quite sure what they mean by whiteout since rm only unlinks the file (unless the -P flag is used and then it's written out three times, so I doubt any simple software method could recover the file). I don't know of any way to have rm perform a whiteout, and I don't know of any command line tools that do.

When I create a file, rm it, and then try to rm -W it I get a "No such file or directory" error. If I attempt it on an already existant file, I get a "File exists" error.

Is this an option that's available in other systems but not in Mac or am I misunderstanding it's purpose/use?
__________________
~Jayson <www.kempinger.us>
GlowingApple is offline   Reply With Quote
Old 03-30-2006, 12:22 AM   #2
hayne
Site Admin
 
Join Date: Jan 2002
Location: Montreal
Posts: 31,956
I believe that the "-W" flag only applies when a filesystem has been mounted as a layer over another one using a "union" mount. (This is highly unusual and I don't think you'll see it in normal OS X use.)
Here's an article on union mounts: http://www.usenix.org/publications/l...ers/mckusick.a
It explains the "whiteout" operation.
__________________
hayne.net/macosx.html
hayne is offline   Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



All times are GMT -5. The time now is 11:59 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.
Site design © IDG Consumer & SMB; individuals retain copyright of their postings
but consent to the possible use of their material in other areas of IDG Consumer & SMB.