Ralph Shumaker wrote:
> James G. Sack (jim) wrote:
>> Ralph Shumaker wrote:
>>  
>>> Someone here told me a convenient way to create a link in Nautilus,
>>> namely dragging a file or directory to where I want the link, but before
>>> letting go of the mouse drag button, press Alt.  Letting go with the Alt
>>> key down gives a little popup menu.
>>>
>>> Now, I'd like to know of an easy way to delete *just* the link, not what
>>> it's pointing to.  I'd like an easy mouse-driven way, but presently I
>>> cannot even find a command line way.  man ln doesn't give anything
>>> useful that I can see.  apropos didn't show much of promise either.
>>>
>>> I have a way to do it, but it involves too many steps, namely renaming
>>> what the link points to, deleting the now-dangling link, then renaming
>>> the object back.
>>>     
>>
>> I believe you are trying to make it more complicated than it is!
>> Just delete it. With point and right-click, drag-to-trash (yuk), or
>> command line rm. The link (only) will be removed -- not the target. Try
>> it on links to some test files just to reassure yourself.
>>
>> Regards,
>> ..jim
>>   
> 
> I tried *one* thing you suggested on a test file.  But like an idiot, I
> tried another thing you suggested on the real thing (without testing
> first), namely rm linkName on a command line.  How do I recover the
> target that got dumped along with the link?  (And no, I don't have a
> backup.)
>
Short answer: Sorry. Probably no good way.

There is a very painful kind of undelete in ext2 (ext3, too I presume),
that I have used a long time ago. It's available inside mc (midnight
commander), but ..

 1) it probably is critically dependent on the filesystem storage
allocation unit not having been reused since the deletion. I don't know
how to judge, but I'm sure the chances of the storage space getting
overwritten with something else is a monotonically increasing value.

 2) I don't even remember offhand how to use it, but I kind-of remember
it being a bit complicated/non-intuitive and so, it would probably be
best rehearsed on a test system first.

 3) In the best of cases, you may have to examine *lots* (>= thousands)
of files in the lost&found directory to find your deleted file, and then
you may need to binary edit it and/or paste pieces together. This is not
a cheap operation.

Some customer of a prior employer once asked me why anyone would use an
OS that didn't have an undelete in it's default filesystem. I didn't
have an answer. I guess the best answer might be if you want undelete,
then use the "trash" feature (and don't use the command line). Maybe
other people will contribute other answers.

Bottom line: if it's priceless[1], then you may want to spend a lot of
time/money to recover it. If not, well, maybe it's just a lesson
learned.  :-( Most of us have done that (shhhh..). :-[


[1] I'm sure if it were priceless, you would have a backup.

Regards,
..jim

-- 
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-newbie

Reply via email to