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

Peter Dyballa Peter_Dyballa at Web.DE
Sat Feb 26 02:48:42 PST 2005


Am 26.02.2005 um 03:24 schrieb 
x-unix-request at listserver.themacintoshguy.com:

> Would I be over-optimistic if I suggested that a different quoting
> method in the script might fix this?

Since the Perl scripts can't print the file's name correctly, print 
must return an error code. If you catch this situation you have in 
$inode the inode number of that file can unlink (delete) it in Perl.

If you really want to know the file's name, catch the error condition 
too and print in a loop every character of this file in hex!

This find

      find /Volumes/CLEARLIGHT/.Trashes/501/legoland -type f -ls

fails too? Since the legoland directory is empty, find will only print 
information on one subject: your file. Any numbers in the output can be 
taken as an argument to find to verify whether this number is an inode 
number or the size of that file or the uid or gid of the file's owner 
by using this invokation:

      find /Volumes/CLEARLIGHT/.Trashes/501/legoland -type f -inum <the 
number>

If find finds a file and reports this with or without an error message 
you know your file's inode  number (it's find's inum argument) and you 
now can cd into /Volumes/CLEARLIGHT/.Trashes/501/legoland and try to 
unlink it via:

      find . -type f -inum <the number> -delete
	rm -i *

--
Greetings

   Pete

These are my principles and if you don't like them... well, I have 
others. - Groucho Marx



More information about the X-Unix mailing list