Illegal characters

From Freephile Wiki
Revision as of 13:28, 24 February 2025 by Admin (talk | contribs) (Text replacement - "<(\/?)source" to "<$1syntaxhighlight")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

You're cleaning up a Linux filesystem to make it compatible with Windows (which doesn't accept the kind of characters that Linux hangs around with).

find . -name "*[<>:\\|?*]*" -exec bash -c 'x="{}"; y=$(sed "s/[<>:\\|?*]\+/-/g" <<< "$x") && mv "$x" "$y" ' \;