Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!aplcen!jhunix!doug From: doug@jhunix.HCF.JHU.EDU (Douglas W O'neal) Newsgroups: comp.unix.shell Subject: Re: File remove command? Message-ID: <8725@jhunix.HCF.JHU.EDU> Date: 17 Jun 91 12:22:05 GMT References: <3431@crdos1.crd.ge.COM-> Organization: The Johns Hopkins University - HCF Lines: 28 In article <3431@crdos1.crd.ge.COM-> davidsen@crdos1.crd.ge.com (bill davidsen) writes: ->Has anyone written a remove command which will unlink all links to a ->file inode when the command is issued on any one name? Yes I know it's ->dangerous, but there are times when I want certain data unconditionally ->off my system. -> ->Example: -> $ mkdir foo -> $ cd foo -> $ date ->x1 -> $ ln x1 x2 -> $ remove x1 # this is the one -> $ ls -> $ ->-- ->bill davidsen (davidsen@crdos1.crd.GE.COM -or- uunet!crdgw1!crdos1!davidsen) -> "Most of the VAX instructions are in microcode, -> but halt and no-op are in hardware for efficiency" How about find / -inum `ls -i foo | awk '{print $1}' -` -exec rm -f {} \; -print Doug -- Doug O'Neal, Distributed Systems Programmer, Johns Hopkins University doug@jhuvms.bitnet, doug@jhuvms.hcf.jhu.edu, mimsy!aplcen!jhunix!doug Like many of the features of UNIX, UUCP appears theoretically unworkable... - DEC Professional, April 1990