как разработка на ответе @tante, можно хотеть удостовериться, что используемый список файлов корректен прежде, чем удалить те файлы:
find <source_dir> -name <filename> -print
если контроль показывает действительный список затем
find <source_dir> -name <filename> -delete
другая опция при желании этого по многим каталогам с помощью временного каталога содержания:
mkdir <dest_dir>
for i in <list_of_directories>
do
find "$i" -name <filename> -exec /bin/mv {} <dest_dir>
done
# check dest_dir
ls dest_dir
rm -rf <dest_dir>
Как всегда, гарантируйте точность любых сценариев перед выполнением и всегда имейте готовое резервное копирование, упаковывают что-то, идет не так, как надо.
Я не могу помнить, зафиксировал ли я это, но можно смотреть на мой файл ответа:
Это базируется прочь более сложного примера в:
https://help.ubuntu.com/10.04/installation-guide/i386/appendix-preseed.html https://help.ubuntu.com/10.04/installation-guide/example-preseed.txt
Править: В случае, если ссылка выше устаревших движений, вот полное содержание файла:
# Locale sets language and country.
d-i debian-installer/locale string en_US
# Keyboard selection.
# Disable automatic (interactive) keymap detection.
d-i console-setup/ask_detect boolean false
#d-i console-setup/modelcode string pc105
d-i console-setup/layoutcode string us
# To select a variant of the selected layout (if you leave this out, the
# basic form of the layout will be used):
#d-i console-setup/variantcode string dvorak
# Install the Ubuntu desktop.
tasksel tasksel/first multiselect ubuntu-desktop
# On live DVDs, don't spend huge amounts of time removing substantial
# application packages pulled in by language packs. Given that we clearly
# have the space to include them on the DVD, they're useful and we might as
# well keep them installed.
ubiquity ubiquity/keep-installed string icedtea6-plugin openoffice.org
ubiquity ubiquity/summary string
ubiquity ubiquity/reboot boolean true
ubiquity languagechooser/language-name string English
ubiquity countrychooser/shortlist string US
ubiquity localechooser/supported-locales string en_US.UTF-8
ubiquity time/zone string America/Los_Angeles
# Not needed if only one disk
#ubiquity partman-auto/disk string /dev/sda
ubiquity partman-auto/method string regular
ubiquity partman-lvm/device_remove_lvm string boolean true
ubiquity partman-md/device_remove_md string boolean true
ubiquity partman-lvm/confirm string boolean true
ubiquity partman-auto/choose_recipe select atomic
ubiquity partman/confirm_write_new_label string boolean true
ubiquity partman/choose_partition select finish
ubiquity partman/confirm string boolean true
ubiquity partman/confirm_nooverwrite string boolean true
ubiquity passwd/user-fullname string John Doe III
ubiquity passwd/username string user
ubiquity passwd/user-password string alamepassword
ubiquity passwd/user-password-again string alamepassword
ubiquity user-setup/encrypt-home boolean false