Gerard Beekmans wrote: > Bruce Dubbs wrote: >> In the LFS cleanfs script, we have the construct: >> >> cd /tmp && >> find . -xdev -mindepth 1 ! -name lost+found \ >> -delete || failed=1 >> >> Since I test build a lot of apps in /tmp, this instruction can take a >> very long time upon bootup. Can we change it to make the process a >> bit faster? How about something like: >> >> for file in /tmp/*; do >> if [ $file != lost+found ]; then rm -r $file; fi >> done > > One issue that comes to mind are errors "argument list too long." I > don't know if a "for file in *" construct has this problem. It has > happened a few times where a simple "rm dir/*" failed because there > were more files than there is room in rm's argument list.
The for construct doesn't have this issue. :) Dave -- http://linuxfromscratch.org/mailman/listinfo/lfs-dev FAQ: http://www.linuxfromscratch.org/faq/ Unsubscribe: See the above information page