RE: [SLE] Script for locating illegal file names?
-----Original Message----- From: david rankin [mailto:drankin@cox-internet.com] Sent: Monday, November 28, 2005 3:06 PM To: Suse Linux Subject: [SLE] Script for locating illegal file names?
Mates,
I manage my own server with 10 clients. The 'not so intelligent' folks I work with have saved file names that cannot be backed up with growisofs, etc.., because the file names are too long and violate the Joliet and Rock-Ridge conventions. This usually happens when they save web pages and the html title gets used as the filename. I need a way to search the sever and identify the files that are too long so I can change them without having to search manually.
Does anybody know of a tool that will do this?
I have used "growisofs -dry-run ..." to find them one by one, but this is quite cumbersome.
I don't remember the exact filename limits for Joliet/Rock Ridge, but something like this: `find /base/path/ -name "??????????..????????????*" -print` Should find them all. The catch is, you have to replace the ?????? part with the same number of question marks as the longest allowed filename in Joliet or RR. ("?" matches on exactly one character -- no more, no less -- including spaces/digits/symbols/etc. "*" matches on any number of any character, including a null character. So in English this command line reads like "find every file under the path /base/path/ that has at least [number of ?'s] characters in it, and either ends there or has anything else after it.") There might be a shortcut syntax for find, I'm just not sure...something like `find /base/path/ -name "?{0,255}*" -print`, maybe...you'll have to play around to find something that works, but I'll be curious to know what you find if you do find a shortcut... - Ian
participants (1)
-
Marlier, Ian