dont know
This commit is contained in:
1 parent
b1fea33cb5
commit
1ced1d2ae5
2 files changed
+28
No files matched your search
@@ -0,0 +1 @@
|
|||||||
|
the age of this file is the last time the rsync was running
|
||||||
@@ -1,5 +1,32 @@
|
|||||||
#!/bin/zsh
|
#!/bin/zsh
|
||||||
|
|
||||||
|
todo zeitabhängiger ablauf
|
||||||
|
|
||||||
|
## create last.run if not exist
|
||||||
|
# if [ ! -f "last.run" ]
|
||||||
|
# echo "the age of this file is the last time the rsync was running" > "last.run"
|
||||||
|
|
||||||
|
# # check if the more than one week was since the last run
|
||||||
|
|
||||||
|
|
||||||
|
# #funtion arguments -> filename to comapre against curr time
|
||||||
|
# function comparedate() {
|
||||||
|
# MAXAGE=$(bc <<< '60*60*24*7') # seconds in one week
|
||||||
|
# # file age in seconds = current_time - file_modification_time.
|
||||||
|
# FILEAGE=$(($(date +%s) - $(stat -c '%Y' "$1")))
|
||||||
|
# test $FILEAGE -lt $MAXAGE && {
|
||||||
|
# echo "$1 is less than 28 hours old."
|
||||||
|
# return 0
|
||||||
|
# }
|
||||||
|
# echo "$1 is older than 28 hours seconds."
|
||||||
|
# return 1
|
||||||
|
# }
|
||||||
|
|
||||||
|
# #sample usage of function test if file /tmp/test.sh is older than 28 hours or not
|
||||||
|
# comparedate /tmp/test.sh
|
||||||
|
#######END_SCRIPT#########
|
||||||
|
|
||||||
|
|
||||||
exclude='--exclude-from=rsync_exclude_list'
|
exclude='--exclude-from=rsync_exclude_list'
|
||||||
#includefile='--include-from=rsync_include_list'
|
#includefile='--include-from=rsync_include_list'
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user