[X-Unix] Unlinking a file... illegal characters?

Brian Medley bpm-list-osx-unix at 4321.tv
Thu Feb 24 20:13:00 PST 2005


On Fri, Feb 25, 2005 at 12:14:17AM +0000, Stroller wrote:

> I have a file that I don't seem to be able to remove from the trash.  
> Emptying the trash simply doesn't work - nothing happens, you still see  
> paper in the basket - and I seem to be unable to remove it from the  
> command line, as shown:
> 
>   $ rm -rf /Volumes/CLEARLIGHT/.Trashes/
>  rm:  
> /Volumes/CLEARLIGHT/.Trashes//501/legoland/ 
> e??y??y??y??vk??????..??????: File name too long

You might try:

$ ls -lFa -i
total 0
3571782 -rw-r--r--    1 bpm      bpm             0 Feb 24 22:08 real_long_file
$ find . -inum 3571782
./real_long_file
$ find . -inum 3571782 -print0 | xargs -0 
./real_long_file
$ find . -inum 3571782 -print0 | xargs -0 rm -f
$ ls -lFa
total 0
$ 

If the rm doesn't work, then maybe

    $ find . -inum 3571782 -print0 | xargs -0 -i mv \{\} short

will.

-- 
~`^`'~=-._.-=~'`^`'~=-._.-=~'^'~=-., \|/  (___)  \|/ _,.-=~'`^`
                                      @~./'O o`\.~@
      "Knowledge is Power"           /__( \___/ )__\  *PPPFFBT!*
         -- Francis Bacon               `\__`U_/'
 _.-=~'``'~=-._.-=~'``'~=-._.-=~'`^`'~= <____|'  ^^`'~=-.,__,.-=
~'^`'~=-._.-=~'`^`'~=-._.-=~'^'~=-.,__,.-==--^'~=-.,__,.-=~'`^`


More information about the X-Unix mailing list