Carlos E. R.
2010-10-30 12:16:04 UTC
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
reads them, one by one:
while read FILES ; do
WorkOn "$FILES"
done < $LISTOFFILES
Calling commands with enclosed "$FILES" variable works with spaces.
However, you would still traverse the list twice at least, because the
attributes are not stored that way, only the names.
You could use find with xargs, but you still have to access the disk
several times.
- --
Cheers,
Carlos E. R.
(from 11.2 x86_64 "Emerald" at Telcontar)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.12 (GNU/Linux)
iEYEARECAAYFAkzMDIYACgkQtTMYHG2NR9WBhwCfTISuBAAlNKnYACWtdvZsOY97
iqwAoIaU6C84WCExp1DekC4f6LDabjut
=5Tt6
-----END PGP SIGNATURE-----
Hash: SHA1
On files/directories with no user, I want to change the user to nobody and
likewise for the group. I could run the initial script twice, once to detect
unowned files and the other to detect unowned groups and handle each
separately. However, on some systems we have terabyte filesystems with
millions of files and a single find command can run for days. Thus I would
like to take this initial file and use that to correct both problems.
The problem I keep running into is with pathnames with embedded spaces. I
have tried everything I can think of using shell scripts, awk and perl and
they all have problems with pathnames with embedded spaces.
I simply write the names to a file, one file per line. Then a while looplikewise for the group. I could run the initial script twice, once to detect
unowned files and the other to detect unowned groups and handle each
separately. However, on some systems we have terabyte filesystems with
millions of files and a single find command can run for days. Thus I would
like to take this initial file and use that to correct both problems.
The problem I keep running into is with pathnames with embedded spaces. I
have tried everything I can think of using shell scripts, awk and perl and
they all have problems with pathnames with embedded spaces.
reads them, one by one:
while read FILES ; do
WorkOn "$FILES"
done < $LISTOFFILES
Calling commands with enclosed "$FILES" variable works with spaces.
However, you would still traverse the list twice at least, because the
attributes are not stored that way, only the names.
You could use find with xargs, but you still have to access the disk
several times.
- --
Cheers,
Carlos E. R.
(from 11.2 x86_64 "Emerald" at Telcontar)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.12 (GNU/Linux)
iEYEARECAAYFAkzMDIYACgkQtTMYHG2NR9WBhwCfTISuBAAlNKnYACWtdvZsOY97
iqwAoIaU6C84WCExp1DekC4f6LDabjut
=5Tt6
-----END PGP SIGNATURE-----
--
To unsubscribe, e-mail: opensuse+***@opensuse.org
For additional commands, e-mail: opensuse+***@opensuse.org
To unsubscribe, e-mail: opensuse+***@opensuse.org
For additional commands, e-mail: opensuse+***@opensuse.org