Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
03-04-2003, 01:56 PM
|
#1
|
Member
Registered: Aug 2001
Location: Buffalo, NY
Distribution: Red Hat
Posts: 83
Rep:
|
RedHat 8.0 symbolic links?
Has anyone else noticed issues with RedHat 8.0's ln command to make symbolic links? Call me crazy, but when I do something simple like:
ln -s /usr/local/src /home/meyers
and then
rm /home/meyers
it tries to remove all the files and dirs within /usr/local/src ? When I do a ln -s on my RedHat 7.2 system and then remove the symbolic link, it removes it just like any other file.
Am I missing something - did something change here? Am I losing my mind?
|
|
|
03-04-2003, 03:00 PM
|
#2
|
LQ Guru
Registered: Jan 2001
Posts: 24,149
|
Something is wrong with your links then.
Have you tried going into your home directory and just issuing this:
rm meyers
|
|
|
03-04-2003, 03:02 PM
|
#3
|
Member
Registered: Aug 2001
Location: Buffalo, NY
Distribution: Red Hat
Posts: 83
Original Poster
Rep:
|
Any idea what's going on down below here? The /usr/local/src dir is owner root, group root, and chmoded 755.
Code:
[meyers@vanadium meyers]$ cd /home/meyers/
[meyers@vanadium meyers]$ ls -la
total 28
drwx------ 3 meyers meyers 4096 Mar 4 15:04 .
drwxr-xr-x 5 root root 4096 Mar 2 09:37 ..
-rw------- 1 meyers meyers 482 Mar 4 15:56 .bash_history
-rw-r--r-- 1 meyers meyers 24 Mar 2 09:37 .bash_logout
-rw-r--r-- 1 meyers meyers 191 Mar 2 09:37 .bash_profile
-rw-r--r-- 1 meyers meyers 124 Mar 2 09:37 .bashrc
drwxrwxr-x 3 meyers meyers 4096 Mar 3 09:41 .cpan
[meyers@vanadium meyers]$ ln -s /usr/local/src/
[meyers@vanadium meyers]$ ls -la
total 28
drwx------ 3 meyers meyers 4096 Mar 4 16:10 .
drwxr-xr-x 5 root root 4096 Mar 2 09:37 ..
-rw------- 1 meyers meyers 482 Mar 4 15:56 .bash_history
-rw-r--r-- 1 meyers meyers 24 Mar 2 09:37 .bash_logout
-rw-r--r-- 1 meyers meyers 191 Mar 2 09:37 .bash_profile
-rw-r--r-- 1 meyers meyers 124 Mar 2 09:37 .bashrc
drwxrwxr-x 3 meyers meyers 4096 Mar 3 09:41 .cpan
lrwxrwxrwx 1 meyers meyers 15 Mar 4 16:10 src -> /usr/local/src/
[meyers@vanadium meyers]$ rm src/
rm: remove write-protected directory `src/'? y
rm: remove write-protected directory `src//apache_1.3.27'? n
rm: remove write-protected regular file `src//mod_perl-1.27/t/docs/subr/index.html'? n
rm: remove write-protected regular file `src//mod_perl-1.27/t/docs/test.shtml'? n
rm: remove write-protected regular file `src//mod_perl-1.27/t/docs/blib.pl'?
[meyers@vanadium meyers]$
Last edited by cliffyman; 03-04-2003 at 03:05 PM.
|
|
|
03-04-2003, 03:21 PM
|
#4
|
Member
Registered: May 2002
Location: AK - The last frontier.
Distribution: Red Hat 8.0, Slackware 8.1, Knoppix 3.7, Lunar 1.3, Sorcerer
Posts: 771
Rep:
|
What is rm aliased as for your root environment?
Have you tried rm src instead of rm src/ ?
|
|
|
03-04-2003, 03:31 PM
|
#5
|
Member
Registered: Aug 2001
Location: Buffalo, NY
Distribution: Red Hat
Posts: 83
Original Poster
Rep:
|
Your second suggestion hit the nail on the head - rm src works kills the soft link as expected but rm src/ for some reason tries to kill the linked directory itself. In RedHat 7.2, rm src and rm src/ do the exact same thing.
Thanks again everyone for the help with this stupid question.
|
|
|
03-04-2003, 04:04 PM
|
#6
|
Member
Registered: May 2002
Location: AK - The last frontier.
Distribution: Red Hat 8.0, Slackware 8.1, Knoppix 3.7, Lunar 1.3, Sorcerer
Posts: 771
Rep:
|
I wouldnt blame it on RH version difference. What version of fileutils ( of which rm is a part ) are you using? Try
rm --version
in both environments and post.
Again, do
alias | grep rm
in both environments.
Curious!!!!
|
|
|
03-04-2003, 11:40 PM
|
#7
|
Member
Registered: Aug 2001
Location: Buffalo, NY
Distribution: Red Hat
Posts: 83
Original Poster
Rep:
|
RH 7.2 uses fileutils version 4.1 and RH 8.0 uses fileutils version 4.1.9
|
|
|
03-04-2003, 11:59 PM
|
#8
|
LQ Guru
Registered: Jan 2001
Posts: 24,149
|
Well most likely when your trying to rm like:
rm src/
Then it reads it like a directory I would presume for some reason. Links are just files, so when deleting them, you don't need to put the / at the end, just rm the actual filename in your case.
But testing on my Slack box, it worked both ways for me with no problems. And the version I have is 4.1
|
|
|
03-05-2003, 07:06 AM
|
#9
|
Member
Registered: Aug 2001
Location: Buffalo, NY
Distribution: Red Hat
Posts: 83
Original Poster
Rep:
|
Right, and it works fine on RedHat 7.2 and that uses fileutils 4.1 also - something changed in 4.1.9. Thanks for help clearing up the mystery folks!
|
|
|
All times are GMT -5. The time now is 01:46 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|