Mailinglist Archive: opensuse (4570 mails)
| < Previous | Next > |
RE: [SLE] Script for locating illegal file names?
- From: "Marlier, Ian" <ian.marlier@xxxxxxxxxxxxxxxxxxx>
- Date: Mon, 28 Nov 2005 20:56:33 +0000 (UTC)
- Message-id: <802441990C18274E9289B19071ED635007069E@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
> -----Original Message-----
> From: david rankin [mailto:drankin@xxxxxxxxxxxxxxxx]
> 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
| < Previous | Next > |