Showing results for 
Search instead for 
Did you mean: 

Filesystem question

Filesystem question

I have a user who claims he did the following:

cp -r /u02/stuff /u102
cd /u102/stuff
rm *
cd /u102
rmdir stuff

He claims that the stuff directory was deleted
from both /u02 & /u102. I am unable to recreate the situation. Every time I try, I get the correct results; only /u102/stuff is removed and /u01/stuff is intact. This user is
very reputable DBA and everyone believes him.
Is this possible? The following is the config:
/dev/cciss/c0d0p12 /u02
/dev/cciss/c0d1p2 /u102

Any thoughts? I can't tell you what I really think, but I have seen some very strnage things in my life so I can't totally rule it out. I think he must have made a mistake and I only have his word on what he said he did. His .bash_history looks suspicious and I am not even going there. I have to take his word for it that what he told me is in fact true.

Kodjo Agbenu
Honored Contributor

Re: Filesystem question

Hello Brian

Under normal configuration, this should not happen. However, make sure that there is no abusive usage of symlinks on your systems.
Best regards,

Learn and explain...
Abdul Rahiman
Esteemed Contributor

Re: Filesystem question

Like the previous response suggested, symlinks could be in play here. Otherwise it could be even a simple typo in the commands, (btw, everyone makes a mistake.. the grace is in accepting it and not repeating it..;- simple sysadmin 101, applies to DBAs too..:-)

No unix, no fun
Chris Eubank
Valued Contributor

Re: Filesystem question

For sake of trying to solve an obvious argument:

Nope. For this to work, he would have *had* to use the recursive switch with the RM command.

The only other way (other than the possibility of "stuff" being a symbolic link to another directory) that this could have happened successfully, is if the "rm" command is aliased to "rm -r".

If it *is* aliased, then you could have a much larger problem to deal with than DBA's that have the popular majority believing everything they say :)

Now that I think of it, if "stuff" is a symbolic link to another directory, they would not have been able to delete it with "rmdir". They would have received a message "rmdir: stuff: Not a directory"

:) Hope this helps