0

files with same names but in different named directories get deleted together when I try to delete one of the directories - I never made a link between these files, there is no link, and they were copied separately at different times. Is there any suggestions as to what it could be doing?

I ended up deleting them both because I had a backup but would still accept any suggestions in case it happens again.

The subdirectories "beans" is what contain the same files but like I said they were not linked so I am not sure why I could not delete one without the other.

A/beans/files

B/beans/files

  • How are you deleting the directories? – Sparhawk Jan 27 at 23:58
  • By doing rm -r A and then rm -r beans inside of directory A – Dominique Jan 28 at 0:01
  • 1
    That doesn't really make sense to me. How can you cd A if it's gone? Please edit your question, and paste the precise commands (including cd) that you used, and any output, if present. – Sparhawk Jan 28 at 0:02
  • just to be sure; you say there was no "link", but perhaps you were looking for symlinks? Could there have been hard links? – Jeff Schaller Jan 28 at 1:47
  • @JeffSchaller But even if they were hard links, rm-ing one shouldn't delete the other, would it? – Sparhawk Jan 28 at 2:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.