Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

rsync delete old files

rsync -avh source/ dest/ --delete

// from https://superuser.com/questions/156664/what-are-the-differences-between-the-rsync-delete-options
// del opts:
 --del                   an alias for --delete-during
 --delete                delete extraneous files from dest dirs
 --delete-before         receiver deletes before transfer (default)
 --delete-during         receiver deletes during xfer, not before
 --delete-delay          find deletions during, delete after
 --delete-after          receiver deletes after transfer, not before
 --delete-excluded       also delete excluded files from dest dirs
Comment

PREVIOUS NEXT
Code Example
Shell :: diff linux 
Shell :: make new branch in git 
Shell :: ssh login without passowrd 
Shell :: authentication failed for git 
Shell :: if clauses bash 
Shell :: linux kill ssh connection 
Shell :: install moment.js 
Shell :: jenkinsfile run curl in a function 
Shell :: How to delete dir, subdirectory, fils all in cmd 
Shell :: setup ssh key 
Shell :: linux apps 
Shell :: selinux 
Shell :: scp all files in currrent directory 
Shell :: apt package manager 
Shell :: letsencrypt domain error 
Shell :: powershell command line variables 
Shell :: bash escape all special characters 
Shell :: vim delete word without yank 
Shell :: ssh bad owner permissions 
Shell :: update centos kernel version yum 
Shell :: curl multiple requests 
Shell :: bash search history 
Shell :: set git remote heroku to https://git.heroku.com/resume-projects.git 
Shell :: cors package install npm 
Shell :: Examples of add-apt-repository and updating the APT cache 
Shell :: go test color output 
Shell :: mac noide folder 
Shell :: Add or remove published service ports of an existing service 
Shell :: ubuntu list compillers 
Shell :: Error: No Homebrew ruby 2.6.8 available for arm64 processors! 
ADD CONTENT
Topic
Content
Source link
Name
7+5 =