make buf() to respect file attributes on file backup

This commit is contained in:
Ivan Povalyukhin
2015-04-11 13:50:39 -07:00
parent c81971d1d8
commit f420560986
2 changed files with 9 additions and 1 deletions

View File

@@ -213,5 +213,5 @@ function buf ()
group 'base'
local filename=$1
local filetime=$(date +%Y%m%d_%H%M%S)
cp "${filename}" "${filename}_${filetime}"
cp -a "${filename}" "${filename}_${filetime}"
}