PROBLEM: Deleting Pesky Files ========= > Have you seen this problem before? 'ls -l' can list file, > but 'rm' cannot remove it! I'm trying to delete 'sprcboot.html' SOLUTION: ========= >From p. 81 of my all-time favorite Unix manual, Essential Systems Administration (O'Reilly): "...it is possible for some buggy application program to put a file into a bizarre, inconclusive state: quasi-directories that rm interprets as such but rmdir doesn't, [OR, in my case] files that ls lists but rm can't find, and the like. Users can also create such files if they experiment with certain filesystem manipulation tools..." Use the directory editor feature of the emacs editor. OTHER POSSIBLE SOLUTIONS ========================== (Many thanks to *ALL* who responded, too many to name!) > It's probably not the 'ls -l' versus the 'ls' that makes the difference, it's more likely the 'sprc*' versus the 'sprcboot.html'. You probably have an unprintable character in the filename. Try using 'ls -b' in the directory where the "problem" file is, and look for a \xxx string (with 3 numbers where the x's are) in the filename. For each \xxx number string, put a ? in the filename you use with the 'rm'. So, for example if you get "sprcboot\003.html", try "rm sprcboot?.html". > Try rm -i * and say 'no' to all but the file you want to delete > Execute ls -lab sprc* and it might show what it is. The 'b' will show any strange characters in escaped form. There might be something in the name of the file that doesn't show on your screen. And, if you want to remove it, you can access it by its' inode number .... find . -inum 170669 -exec rm {} \; > Run 'ls -q' on the directory, which shows non-printable characters as question marks. >Try running ls -l | od -c | more to see if there are non printing characters embedded in the filenames > This should print out the entire filename, including "hidden" characters such as space: for i in `ls -1 sprc*` ; do echo \"$i\" ; done > It appears that you need to do: rm sprc*/sprcboot.html _______________________________________________ sunmanagers mailing list sunmanagers@sunmanagers.org http://www.sunmanagers.org/mailman/listinfo/sunmanagersReceived on Thu Jan 31 15:53:29 2002
This archive was generated by hypermail 2.1.8 : Thu Mar 03 2016 - 06:42:33 EST