Optimize speed of deletion in find command
I would like to recommend to use + instead of \; in the find command. As this will ensure the removal of all selected directories in a single invocation. Hence improve the speed of deletion. Change-Id: I409fe11aae217afb6f790491591005c679264ed4
This commit is contained in:
parent
3c8cf6a724
commit
bb38d0e325
@ -11,4 +11,4 @@ APT::Acquire::Languages "none";
|
|||||||
EOF
|
EOF
|
||||||
|
|
||||||
# And now make sure that we don't fall foul of Debian bug 641967
|
# And now make sure that we don't fall foul of Debian bug 641967
|
||||||
find $TARGET_ROOT/var/lib/apt/lists/ -type f -name '*_i18n_Translation-*' -exec sudo rm -f {} \;
|
find $TARGET_ROOT/var/lib/apt/lists/ -type f -name '*_i18n_Translation-*' -exec sudo rm -f {} +
|
||||||
|
@ -9,7 +9,7 @@ yum remove -y grub2
|
|||||||
# Remove all old versions of grub2 from the yum cache and then ensure the
|
# Remove all old versions of grub2 from the yum cache and then ensure the
|
||||||
# latest version is in the cache.
|
# latest version is in the cache.
|
||||||
basearch=$(cat /etc/yum/vars/basearch)
|
basearch=$(cat /etc/yum/vars/basearch)
|
||||||
find /tmp/yum/$basearch -regex ".*/grub2-[0-9].*\.rpm" -exec rm -f {} \;
|
find /tmp/yum/$basearch -regex ".*/grub2-[0-9].*\.rpm" -exec rm -f {} +
|
||||||
install-packages -d grub2
|
install-packages -d grub2
|
||||||
|
|
||||||
# Copy grub2 rpm out of mounted yum cache for install during finalise
|
# Copy grub2 rpm out of mounted yum cache for install during finalise
|
||||||
|
@ -171,7 +171,7 @@ function populate_lib () {
|
|||||||
|
|
||||||
cp -a "$MODULE_DIR" "$TMP_MOUNT_PATH/lib/modules/$KERNEL_VERSION"
|
cp -a "$MODULE_DIR" "$TMP_MOUNT_PATH/lib/modules/$KERNEL_VERSION"
|
||||||
echo "Removing kernel framebuffer drivers to enforce text mode consoles..."
|
echo "Removing kernel framebuffer drivers to enforce text mode consoles..."
|
||||||
find $TMP_MOUNT_PATH/lib/modules/$KERNEL_VERSION/kernel/drivers/video -name '*fb.ko' -exec rm -v {} \;
|
find $TMP_MOUNT_PATH/lib/modules/$KERNEL_VERSION/kernel/drivers/video -name '*fb.ko' -exec rm -v {} +
|
||||||
if [ -d $FIRMWARE_DIR ]; then
|
if [ -d $FIRMWARE_DIR ]; then
|
||||||
cp -a "$FIRMWARE_DIR" "$TMP_MOUNT_PATH/lib/firmware"
|
cp -a "$FIRMWARE_DIR" "$TMP_MOUNT_PATH/lib/firmware"
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user