Path: utzoo!mnetor!uunet!seismo!esosun!cogen!celerity!jjw From: jjw@celerity.UUCP (Jim ) Newsgroups: comp.unix.questions Subject: Re: Accessing files by inode #s Message-ID: <530@celerity.UUCP> Date: 28 Jan 88 21:58:28 GMT References: <831@dolqci.UUCP> Reply-To: jjw@celerity.UUCP (Jim (JJ) Whelan) Organization: /usr/lib/news/organization Lines: 24 Keywords: inode find Summary: Watch out for other file systems In article <11470@brl-adm.ARPA> iunix1@almsa-1.arpa (Will Martin) asks: >Is there some trick I just don't know that would allow me to refer to a >file by its inode # in performing otherwise-ordinary UNIX commands, >like "cp" or "rm"? Or have people written special commands that will do >this sort of thing? And in article <831@dolqci.UUCP> stein@dolqci.UUCP (Mike Stein) responds: > Yes! You can do anything you want via > > find -inum -exec \; *********************************************************************** WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING *********************************************************************** The find will traverse file mount points so you may locate files in file systems other than the one you are interested in. Be especially careful with using "rm -f" as the command. It is possible to use "-ok" instead of "-exec" which will ask if you want the operation to be performed when the file(s) are located. However the "find" can take a long time on large file systems. -- J. J. Whelan