Re: Spaces in filenames [was: Has a Debian developer ever unintentionally wiped out user files like Apple?]
Richard Kettlewell writes:
> Perfectly well, IME: what do you think the -print0 and -0 options to
> find and xargs are for?
Horribly:
a) -print0 and -0 are not portable(1)
b) they are far too often omitted even when they are available
While portability is not an important issue (but it's still nice) in
init-scripts there are other situations where it's important.
But again, my point was that for practical reasons it's sensible to
use only alphanumerical characters plus '-' etc. in file names.
This is quickly becoming OT, sorry.
1) On Solaris:
$ find . -type f -print0 | xargs -0 ls -l
find: bad option -print0
find: path-list predicate-list
xargs: illegal option -- 0
xargs: Usage: xargs: [-t] [-p] [-e[eofstr]] [-E eofstr] [-I replstr]
[-i[replstr]] [-L #] [-l[#]] [-n # [-x]] [-s size] [cmd [args ...]]
--
#!/usr/bin/perl -w -- Ari Makela <hauva@arska.org> http://arska.org/hauva/ #
# Finger hauva@laphroaig.arska.org for GPG public key.
# "Sailing is, after all, a kind of grace, a kind of magic." - Phil Berman
Reply to: