Preserve timestamps when copying log files

Add timestamp preservation when copying log files.
This commit is contained in:
N-Storm 2025-11-10 04:28:40 +03:00 committed by Igor
parent 794cc8fb3a
commit d5182b43bf

View File

@ -152,8 +152,9 @@ case "$1" in
cd $HDD_LOG
find . -type f -print | grep -E -v "(\.gz|\.xz|\.[0-9]|armbian-ramlog)|\.journal" | while IFS= read -r file
do
dest="/var/log/$file"
cat $file > $dest
dest="/var/log/$file"
cat $file > $dest
touch -r $file $dest
done
;;
*)