Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!ucbvax!pasteur!ames!elroy!usc!polyslo!csun!csuna!abcscnge From: abcscnge@csuna.csun.edu (Scott "The Pseudo-Hacker" Neugroschl) Newsgroups: comp.unix.questions Subject: Re: Ugly file name Summary: watch out for links! Message-ID: <2003@csuna.csun.edu> Date: 24 May 89 02:23:28 GMT References: <105096@sun.Eng.Sun.COM> <131@hydra.ecrcvax.UUCP> Reply-To: abcscnge@csuna.csun.edu (Scott Neugroschl) Organization: CSU Northridge Lines: 27 In article <105096@sun.Eng.Sun.COM> jackh@sun.UUCP (John Hevelin) writes: >3. If I want to save the contents of the file before > removing it, I do something like: > > find . -inum 12345 -exec cat {} \; > goodfile Just make sure that your bad file (inode #12345) has no other links to it (at least in the hierarchy headed by ".") otherwise, you will cat multiple copies of the file together % ls -li total 2 12345 -rw-rw---- 2 me mygroup 5 May 23 19:00 bad_file 12345 -rw-rw---- 2 me mygroup 5 May 23 19:00 OK_file % find . -inum 12345 -exec cat {} \; > goodfile % ls -li total 3 12345 -rw-rw---- 2 me mygroup 5 May 23 19:00 bad_file 12345 -rw-rw---- 2 me mygroup 5 May 23 19:00 OK_file 734 -rw-rw---- 1 me mygroup 10 May 23 20:00 goodfile This should show what I mean... -- Scott "The Pseudo-Hacker" Neugroschl UUCP: ...!sm.unisys.com!csun!csuna.csun.edu!abcscnge -- Beat me, Whip me, make me code in Ada -- Disclaimers? We don't need no stinking disclaimers!!!