James G. Sack (jim) wrote:
Ralph Shumaker wrote:
..
What would be an alternative to "rm linkName" on the command line?  If
you try to rename it, does it not rename the target of the link? same
thing with trying to move the link?

There's no need for what you ask
  rm link_to_target
removes the link, not the target. You should repeat the experiment
(making sure you use disposable junkfiles, this time ;-) ).

I don't know what you may have done in your first test that gave you the
wrong impression. But a careful repeat is recommended.

You probably won't have to do this to see the flaw, but here's how to recreate a skeleton of what I had:
mkdir /temp/obscure
mkdir /temp/obscure/test.folder
mkdir /temp/obscure/test.folder/1.sub.folder
mkdir /temp/obscure/test.folder/2.sub.folder
mkdir /temp/obscure/test.folder/Pictures
mkdir /temp/obscure/test.folder/4.sub.folder
mkdir /temp/obscure/test.folder/Videos
mkdir /temp/obscure/test.folder/6.sub.folder
mkdir /temp/obscure/test.folder/7.sub.folder
mkdir /temp/obscure/test.folder/1.sub.folder/Music
mv ~/Music/* /temp/obscure/test.folder/1.sub.folder/Music
rmdir ~/Music (assuming empty)
rmdir ~/Videos (assuming empty)
ln -s /temp/obscure/test.folder/Videos ~/Videos
ln -s /temp/obscure/test.folder ~/test.folder
mv ~/Pictures/* ~/test.folder/Pictures
rmdir ~/Pictures (assuming empty)
ln -s ~/test.folder/Pictures ~/Pictures
ln -s ~/test.folder/1.sub.folder/Music ~/Music
rm ~/test.folder

This assumes that ln creates links the same way that Nautilus does, namely that it uses the path given to it instead of the absolute path to the actual physical location of the file. There are no other assumptions of which I am aware.

Given this series, with no delays between steps, it's probably easy to see what happened. But given several days delay between a few of the steps (even weeks), and you can forget that you made links that depend on other links. In Nautilus, I opened ~ and freaked when I saw broken links for Pictures, Music, Videos, and others.



--
Ralph

--------------------
I think Intelligent Design is a wonderful idea, deserving of much study;
First, let's find out what intelligence is, as I find the subject muddy.
--Stewart Stremler

--
KPLUG-Newbie@kernel-panic.org
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-newbie

Reply via email to