use reference
This commit is contained in:
parent
2ab1ae74cf
commit
b83dab901e
1 changed files with 1 additions and 5 deletions
|
@ -4,9 +4,5 @@ do
|
||||||
echo "Checking dir '${dir}'..."
|
echo "Checking dir '${dir}'..."
|
||||||
last_file="${dir}/$(ls -ht -- "${dir}" | head -n1)"
|
last_file="${dir}/$(ls -ht -- "${dir}" | head -n1)"
|
||||||
echo "Last modified file is '${last_file}'"
|
echo "Last modified file is '${last_file}'"
|
||||||
last_file_time=$(stat -c %Y -- "${last_file}")
|
touch -r "${last_file}" -- "${dir}"
|
||||||
echo "Last modification time of the file is '${last_file_time}'"
|
|
||||||
last_file_time_formated=$(date -d "@${last_file_time}" +%Y%m%d%H%M.%S)
|
|
||||||
echo "Last modification time formated is '${last_file_time_formated}'"
|
|
||||||
touch -t "${last_file_time_formated}" -- "${dir}"
|
|
||||||
done <<< "$(find . -mindepth 1 -maxdepth 1 -type d)"
|
done <<< "$(find . -mindepth 1 -maxdepth 1 -type d)"
|
||||||
|
|
Loading…
Reference in a new issue