Kullanıcının sahip olduğu ilk iki dosyayı ve kök olarak sahip olduğu sonraki üç dosyayı çıkaran bu bash betiğine sahibim:
##################################################
# Variables
NUM="6" #number of backup files to keep
LOGFILE="/home/boudiccas/cron/obnam-ls.txt"
####################################################
# Change into new directory
cd /home/boudiccas/cron/obnam/
# Generate new file and save it
sudo -u boudiccas obnam ls>"obnamhome-ls-$(date +%Y-%m-%d).txt"
sudo -u boudiccas obnam --config=/etc/obnam-back4.conf ls>"obnamback4-ls-$(date +%Y-%m-%d).txt"
obnam --config=/etc/obnametc.conf ls>"obnametc-ls-$(date +%Y-%m-%d).txt"
obnam --config=/etc/obnamusr.conf ls>"obnamusr-ls-$(date +%Y-%m-%d).txt"
obnam --config=/etc/obnamvar.conf ls>"obnamvar-ls-$(date +%Y-%m-%d).txt"
# Delete old backups!
find /home/boudiccas/cron/obnam -type f -mtime +$NUM -name 'obnamhome-ls-*.txt' -exec rm -v {} + >>$LOGFILE 2>&1
find /home/boudiccas/cron/obnam -type f -mtime +$NUM -name 'obnamback4-ls-*.txt' -exec rm -v {} + >>$LOGFILE 2>&1
find /home/boudiccas/cron/obnam -type f -mtime +$NUM -name 'obnametc-ls-*.txt' -exec rm -v {} + >>$LOGFILE 2>&1
find /home/boudiccas/cron/obnam -type f -mtime +$NUM -name 'obnamusr-ls-*.txt' -exec rm -v {} + >>$LOGFILE 2>&1
find /home/boudiccas/cron/obnam -type f -mtime +$NUM -name 'obnamvar-ls-*.txt' -exec rm -v {} + >>$LOGFILE 2>&1
########################################################################
Lütfen son üç dosyayı kullanıcı tarafından yazılan script ile nasıl alabilirim?