Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Recursive `rm'; what is its symlink policy? [SOLVED]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
gentsquash
l33t
l33t


Joined: 03 Nov 2004
Posts: 753
Location: Still a Gentoo beginner.

PostPosted: Sun Nov 28, 2004 3:49 pm    Post subject: Recursive `rm'; what is its symlink policy? [SOLVED] Reply with quote

This may be implicit in (man "rm"); I don't see it explicitly.

Does `rm' simply NOT follow symlinks? (I did some testing, and
this seems to be the case.) Or does it have some
more-complicated rule which looks at the symlink-target?

[Aside: Is the following to be considered a Bug?: Although
(man "cp") is detailed on how it handles symlinks in
recursive-copies, the `scp' man-page is taciturn in the
extreme...

I sure wish that `scp' had the same recursive-copy options
that `cp' has.]
_________________
Your thread resolved? Putting [SOLVED] in its title helps all Gentooers. (Button "edit" , first post)
Prof. Jonathan LF King, Mathematics dept., University of Florida


Last edited by gentsquash on Tue Aug 30, 2005 8:36 pm; edited 2 times in total
Back to top
View user's profile Send private message
adaptr
Watchman
Watchman


Joined: 06 Oct 2002
Posts: 6730
Location: Rotterdam, Netherlands

PostPosted: Sun Nov 28, 2004 5:18 pm    Post subject: Reply with quote

No, rm does not follow symlinks; it should not, as a symlink is a "jump" from one location in the filesystem to another.
Rm just deletes the direct contents of directories - for a symlinked directory, that is the symlink itself.

More technically, it recursively removes all inodes and their dependants; since the inodes for a symlinked directory are not referenced by the symlink itself (they are referenced by the inode the symlink points to), they are not removed.
_________________
>>> emerge (3 of 7) mcse/70-293 to /
Essential tools: gentoolkit eix profuse screen
Back to top
View user's profile Send private message
gentsquash
l33t
l33t


Joined: 03 Nov 2004
Posts: 753
Location: Still a Gentoo beginner.

PostPosted: Sun Nov 28, 2004 7:19 pm    Post subject: Reply with quote

Thank you adaptr.

What is Linus's telephone number, so I can get him moving on this
`scp' improvement... ?
_________________
Your thread resolved? Putting [SOLVED] in its title helps all Gentooers. (Button "edit" , first post)
Prof. Jonathan LF King, Mathematics dept., University of Florida
Back to top
View user's profile Send private message
adaptr
Watchman
Watchman


Joined: 06 Oct 2002
Posts: 6730
Location: Rotterdam, Netherlands

PostPosted: Mon Nov 29, 2004 11:49 am    Post subject: Reply with quote

Linus Torvalds has nothing to do with scp - or with the 2.6 kernel, for that matter.
How about you try to improve it yourself ?
It is not called open source for nothing...
_________________
>>> emerge (3 of 7) mcse/70-293 to /
Essential tools: gentoolkit eix profuse screen
Back to top
View user's profile Send private message
gentsquash
l33t
l33t


Joined: 03 Nov 2004
Posts: 753
Location: Still a Gentoo beginner.

PostPosted: Mon Nov 29, 2004 10:55 pm    Post subject: Reply with quote

Agreed on the Open Source. Any little contributions I have made
have been on easier stuff; emacs-lisp code for simple functions.
_________________
Your thread resolved? Putting [SOLVED] in its title helps all Gentooers. (Button "edit" , first post)
Prof. Jonathan LF King, Mathematics dept., University of Florida
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum