Ugly file name
Scott "The Pseudo-Hacker" Neugroschl
abcscnge at csuna.csun.edu
Wed May 24 12:23:28 AEST 1989
In article <105096 at sun.Eng.Sun.COM> jackh at 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!!!
More information about the Comp.unix.questions
mailing list