Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utcs!mnetor!seismo!husc6!think!mit-eddie!genrad!decvax!wanginst!tupper From: tupper@wanginst.UUCP Newsgroups: net.unix-wizards Subject: Warning about rm Message-ID: <79@wanginst.UUCP> Date: Tue, 15-Jul-86 13:30:22 EDT Article-I.D.: wanginst.79 Posted: Tue Jul 15 13:30:22 1986 Date-Received: Wed, 16-Jul-86 06:32:08 EDT Distribution: net Organization: Wang Institute, Tyngsboro, Ma. 01879 Lines: 17 Today I ran the following command: rm -r /student/tupper/.dead/.* I was trying to remove alot of files with names like .signature, .login, .etc. The shell expanded my wild card to include /student/tupper/.dead/. and (this is the important part -->) /student/tupper/.dead/.. (that's "dot-dot")! Now rm cleverly makes sure you don't remove "..", but it does not check for ".." at the end of a path name (it does strcmp of filename against ".."). Thus rm, recursivly removed /student/tupper/.dead/.. , which happens to be my home directory (/student/tupper). While I wait for the operator to restore my most of my account, I thought I would pass my experience on for the benefit of others (I've already read news).