Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!uwm.edu!ogicse!orstcs!thyphy.physics.orst.edu!ghe From: ghe@physics.orst.edu (Guangliang He) Newsgroups: comp.unix.aix Subject: Why remove() doesn't remove (symbolic links)? Keywords: remove(), symbolic link Message-ID: <1991May03.174126.13324@lynx.CS.ORST.EDU> Date: 3 May 91 17:41:26 GMT Sender: @lynx.CS.ORST.EDU Reply-To: ghe@physics.orst.edu Organization: Dept. of Physics, Oregon State University Lines: 23 Nntp-Posting-Host: thyphy.physics.orst.edu The title pretty much said it all. The remove() system call fails to remove the sybolic links. The man page of remove() did mention anything special about symolic links. Here is a little program shows the problem: ------ #include main(int argc, char **argv) { if (remove(argv[1])) fprintf(stderr, "can't remove %s\n", argv[1]); } ------ It works fine (no error message) with regular files but prints the 'can't remove.." message on symbolic links. Is it a bug or 'work as designed' :-(??? --- Guangliang He | If anything can go wrong, it will. ghe@physics.orst.edu | -- Murphy's Law