Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!ub.d.umn.edu!cs.umn.edu!atc!hawkmoon!det From: det@hawkmoon.MN.ORG (Derek E. Terveer) Newsgroups: comp.unix.shell Subject: Re: File remove command? Message-ID: <1991Jun17.050747.1436@hawkmoon.MN.ORG> Date: 17 Jun 91 05:07:47 GMT References: <3431@crdos1.crd.ge.COM> <1991Jun15.210940.18999@cbnews.cb.att.com> <1991Jun16.142235.1137@druid.uucp> Distribution: na Organization: Home System (One of the Eternal Champions); Eagan, MN, 55123-2507, USA Lines: 26 >In article <1991Jun15.210940.18999@cbnews.cb.att.com> ask@cblph.att.com writes: >So, you now want to remove all files with inumber 397 >You need to know the root directory of your filesystem >(use the /etc/mount or df command to find out if you are unsure) >Then do a find and remove all occurences of that inumber >$ cd /usrc # /usrc is the filesystem containing the files >$ find . -inum 397 -exec rm {} \; >Caution: inumbers are not unique in your system; only in your > filesystem. So it's a very bad idea to do a > find / -inum 397 ..... Howver, depending on the system and the particular find command, not every find command has "-inum" as an option. I know that the GNU find command has this; howver, the more recent System V Unixen have the -xdev (GNU find) or -mount (System V) option to restrict the search to the implied (by the pathname, "." in your example) file system. If you don't have "-inum" you could, as root, use "ff /dev/rdsk/? | grep 397" to find the file belonging to that inode. Then remove it. See ff(1) and find(1) in the FM. derek -- Derek "Tigger" Terveer det@hawkmoon.MN.ORG -- U of MN Women's Lax I am the way and the truth and the light, I know all the answers; don't need your advice. -- "I am the way and the truth and the light" -- The Legendary Pink Dots