aboutsummaryrefslogtreecommitdiffstats
path: root/.config/zsh
diff options
context:
space:
mode:
Diffstat (limited to '.config/zsh')
-rw-r--r--.config/zsh/includes/functions.zsh79
1 files changed, 48 insertions, 31 deletions
diff --git a/.config/zsh/includes/functions.zsh b/.config/zsh/includes/functions.zsh
index afe4915..9a9ca50 100644
--- a/.config/zsh/includes/functions.zsh
+++ b/.config/zsh/includes/functions.zsh
@@ -268,40 +268,57 @@ lstar() {
## RSYNC
backupinfo() {
- rsync\
- -r\
- -n\
- -t\
- -p\
- -o\
- -h\
- -g\
- -v\
- --progress\
- --delete\
- --ignore-existing\
- --size-only\
- -s\
- --exclude 'lost+found'\
- --exclude '.Trash-1000'\
- --exclude '$RECYCLEBIN'\
- --exclude 'System Volume Information'\
- --exclude '.thumbs'\
- $1 $2
- echo "backupfolder path/to/folder/ /path/to/other/folder"
+ local options=(
+ --delete
+ --dry-run
+ --exclude 'System Volume Information'
+ --exclude 'lost+found'
+ --exclude '.DS_Store'
+ --exclude '.Trash-*'
+ --exclude '.snapshots'
+ --exclude '.thumbs'
+ --exclude '$RECYCLEBIN'
+ --group
+ --human-readable
+ --ignore-existing
+ --owner
+ --perms
+ --progress
+ --recursive
+ --secluded-args
+ --size-only
+ --times
+ --verbose
+ )
+
+ rsync "${options[@]}" "$1" "$2"
+ echo "NOTE: path/to/folder/ /path/to/other/folder"
}
backupfolder() {
- rsync \
- -r\
- -t\
- -p\
- -o\
- -h\
- -g\
- -v\
- --progress\
- --delete --ignore-existing --size-only -s --exclude 'lost+found' --exclude '.Trash-1000' --exclude '$RECYCLEBIN' --exclude 'System Volume Information' --exclude '.thumbs' $1 $2
+ local options=(
+ --delete
+ --exclude 'System Volume Information'
+ --exclude 'lost+found'
+ --exclude '.DS_Store'
+ --exclude '.Trash-*'
+ --exclude '.snapshots'
+ --exclude '.thumbs'
+ --exclude '$RECYCLEBIN'
+ --group
+ --human-readable
+ --ignore-existing
+ --owner
+ --perms
+ --progress
+ --recursive
+ --secluded-args
+ --size-only
+ --times
+ --verbose
+ )
+
+ rsync "${options[@]}" "$1" "$2"
}
# journalctl