> Date: Thu, 20 Jun 2002 07:22:15 -0400 (EDT) > From: "Robert P. J. Day" <[EMAIL PROTECTED]> On Thu, 20 Jun 2002, daniel wrote: > > > "rm Icon?" or "rm Icon?" will work of course, but it'll blow away stuff i > > may want to keep. ie files named "Icons" or something like that. what i'm > > really looking for is a way to represent the "\r" so that i can match the > > filename exactly. > > as an option, use "rm -i Icon?", and just say "n" to the ones you want > to keep. not a perfect solution if there are lots of files that match, > but it does work.
There *is* the Std. Sysadmin Ultimate Method (tm): ls -i Icon* will list the inode of all files whose name begins with "Icon". The inode is the real True Name of the file, down in the o/s. Names are for humans. At any rate, you then do find . -inum icon-inode-num -exec rm {} \; Make sure you put *all* the punctuation in. The find produces a list, the {} says " whatever you're trying to do, do it to the current file in the list", and the \; says "that's the end of the find command". Ex: get the inode: > ls -i xerr* > 115322 xerrors.042202 114579 xerrors.saved to delete xerrors.saved: find . -inum 114579 -exec rm {} \; Book recommendation: Frisch, "Essential System Administration", O'Reilly & Co, publisher esp. read chapters 1 and 2. In 1, you will finally find an explanation of the find command that makes sense. mark, unemployed sysadmin and developer -- "GUILTY, GUILTY, GUILTY!" - Megaphone Mark Slackmeyer, Doonesbury _______________________________________________ Redhat-list mailing list [EMAIL PROTECTED] https://listman.redhat.com/mailman/listinfo/redhat-list