home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / sys / hp48 / 7468 < prev    next >
Encoding:
Internet Message Format  |  1993-01-28  |  2.1 KB

  1. Path: sparky!uunet!olivea!spool.mu.edu!howland.reston.ans.net!usc!sdd.hp.com!hpscit.sc.hp.com!cupnews0.cup.hp.com!news1.boi.hp.com!hp-pcd!hpcvra!rnews!hpcvbbs!akcs.alistairl
  2. From: akcs.alistairl@hpcvbbs.cv.hp.com (Alistair S Lang)
  3. Newsgroups: comp.sys.hp48
  4. Subject: Filenames With Bad Characters
  5. Keywords: files bad characters
  6. Message-ID: <2b652703.2690comp.sys.hp48@hpcvbbs.cv.hp.com>
  7. Date: 26 Jan 93 12:40:02 GMT
  8. Lines: 39
  9.  
  10. Recently there have been a few programs uploaded to seq. that have
  11. contained "silly" characters ; i.e., those that a Unix does not take too
  12. kindly to. This can be annoying as it may prevent you from viewing the
  13. file or downloading it or make renaming or purging of the file seem
  14. impossible.  However I eventually found a command (in a Unix FAQ) that
  15. will permit purging and/or renaming of such files. There are probably
  16. a few commands that can do this but the one listed below seems to be
  17. quite "powerful" and can handle most things.
  18.  
  19. ===============
  20. Part of the Biweekly Posted FQA form  comp.unix.questions
  21. ---------------
  22.  
  23. 2.2)  How do I remove a file with funny characters in the filename ?
  24.  
  25. find . -type f ... -ok rm '{}' \;
  26.  
  27.       where "..." is a group of predicates that uniquely identify the
  28.       file.  One possibility is to figure out the inode number of the
  29.       problem file (use "ls -i .") and then use     |
  30.                                                     |
  31. find . -inum 12345 -ok rm '{}' \;                   |
  32.              ^^^^^                                  |
  33.              \\\\\__________________________________/
  34.       or
  35. find . -inum 12345 -ok mv '{}' new-file-name \;
  36.  
  37.       "-ok" is a safety check - it will prompt you for confirmation of
  38.        the command it's about to execute.  You can use "-exec" instead
  39.        to avoid the prompting, if you want to live dangerously, or if
  40.        you suspect that the filename may contain a funny character
  41.        sequence that will mess up your screen when printed.
  42. ==================
  43.  
  44. A couple of things to note:
  45. Use the first command to remove (rm) the file or use the second to
  46. rename (mv) the file.
  47. Use the on-line Unix manual for more info.
  48.  
  49. Alistair
  50.