home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / unix / shell / 3655 < prev    next >
Encoding:
Text File  |  1992-08-26  |  1.1 KB  |  47 lines

  1. Path: sparky!uunet!gatech!udel!rochester!galileo.cc.rochester.edu!ub!acsu.buffalo.edu!vidya-v
  2. From: vidya-v@acsu.buffalo.edu (vidyaranya)
  3. Newsgroups: comp.unix.shell
  4. Subject: file removal problem solved.
  5. Message-ID: <BtMJuK.KEH@acsu.buffalo.edu>
  6. Date: 27 Aug 92 04:15:56 GMT
  7. Sender: nntp@acsu.buffalo.edu
  8. Organization: UB
  9. Lines: 34
  10. Originator: vidya-v@beatrix.eng.buffalo.edu
  11. Nntp-Posting-Host: beatrix.eng.buffalo.edu
  12.  
  13.  
  14. Thanks to:
  15. jimr@col.hp.com 
  16. silvert@cs.dal.ca
  17. ant@palm.cray.com
  18. msb@sq.com
  19.  
  20. for responding.
  21.  
  22. The solution I finally used came from our system administrator.
  23. I had already tried the 'rm -i' and rm A* options and posted
  24. when they failed.
  25.  
  26. The solution I used needed a simple C program and an Octal
  27. dump of the filename to specify in the C program.
  28. Here it is:
  29.  
  30. #include <stdio.h>
  31.  
  32. main()
  33. {
  34.  
  35.         char *string = "\101\356\377\114\116\271\002\370\116\271\002\240\055\100\377\214\055\012";
  36.         char buf[1024];
  37.  
  38.         sprintf(buf, "rm %s", string);
  39.         system(buf);
  40.         exit(0);
  41. }
  42.  
  43. This seems like a sure shot way of removing the file when all attempts
  44. to fool the shell fail.
  45.  
  46. Vidyaranya
  47.