rsync delete specific files - from different target folder


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting rsync delete specific files - from different target folder
# 1  
Old 11-22-2011
rsync delete specific files - from different target folder

Hi,

I need to use rsync to delete multiple files(only specified files not all) using --delete option, these files are located in different target folders.

Instead of running rsync command multiple times for each file, can we achieve this with one time execution?

your help is much appreciated

Thanks.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Request for Shell script to move files from Subfolder to Parent folder and delete sub folder

Hi Team, I am new to shell script and there is a requirement where files should be moved from Subfolder to parent folder. Eg: parent folder --> /Interface/data/test/IN Sub folder -->/Interface/data/test/IN/Invoice20180607233338 Subfolder will be always with timestamp... (6 Replies)
Discussion started by: srivarun15
6 Replies

2. Shell Programming and Scripting

Shell scripting for moving folder specific files into target directory of that country folder.

I need help to write shell script to copy files from one server to another server. Source Directory UAE(inside i have another folder Misc with files inside UAE folder).I have to copy this to another server UAE folder( Files should be copied to UAE folder and Misc files should be copied in target... (3 Replies)
Discussion started by: naresh2389
3 Replies

3. UNIX for Advanced & Expert Users

Rsync with --delete but do not delete peer dirs on target

rsync with --delete won't honor the delete if the source is something/*. I want the delete to work, but not to delete directories on the target that are peer to the intended directory. For example, using these source and target file structures: Source on desktop: ~/ Money/ ... (4 Replies)
Discussion started by: JavaMeister
4 Replies

4. Shell Programming and Scripting

Need shell script to compare directories and delete files on target server

Hello, I need help in writing the shell script for below mentioned case. There are 2 servers(server A, server B). A cronjob syncs files between these 2 servers. Existing script is copying files from A to B. This is done using the command rsync. However, the files are not deleted... (2 Replies)
Discussion started by: SravaniVedam11
2 Replies

5. UNIX for Dummies Questions & Answers

Rsync Can I delete .NFS and .fuse files

Hello, I have some files in a local directory and perform an rsync command with the files in a remote directory, Now when I checked the files in the local and the remote directory, I found some strange filetypes such as this: .nfs0000000001d0c8e000002ff2 , .fuse_hidden000014da00000001 etc etc,... (3 Replies)
Discussion started by: ajayram
3 Replies

6. Shell Programming and Scripting

How to delete more than 7 days file from Target folder?

Hi Team, I have to remove files which are more than 7 days in my target directory. I have this script but using this i faced some problems like, removed library files of unix. for abc in `find /xxx/abc/OutputFiles/xxxx_*.txt -type f -mtime +5|xargs ls 1` do echo "xxx files are:"$abc ... (1 Reply)
Discussion started by: harris
1 Replies

7. Shell Programming and Scripting

rsync delete single file from the target folder

Hi We want to delete a single file from the destiantion directory using rsync. Is it possible to do this ? or Do we have any alternate approaches in rsync( for ex applying some filters ..etc) For ex: ----------------------------------------------- Source (Folder) ... (3 Replies)
Discussion started by: MVEERA
3 Replies

8. Shell Programming and Scripting

Delete files in a folder with a specific ending

Hi I have files that end with .txt.txt that i want to delete. But I also have files that end with .txt that I want to leave intact. How do I specifically delete files that end with .txt.txt in a folder. thanks (5 Replies)
Discussion started by: kylle345
5 Replies

9. Shell Programming and Scripting

delete all the files in folder a which exist in folder b

Hi , I need a script which basically deltes all files in folder a which are alreasy present in folder b say folder a has files abc.txt pqr .txt and b has abc.txt pqr.txt rmr.txt then file abc.txt and pqr.txt from a should be deleted (6 Replies)
Discussion started by: viv1
6 Replies

10. Shell Programming and Scripting

Batch delete specific folder from user home directories

Hi! Need your help. How can I delete the cache folder of multiple user home directories via automatically executed shell script on a Mac OS X Server? Example: The userdata are stored on a Xsan Volume like this: /Volumes/Xsan/userdata/mike /Volumes/Xsan/userdata/peter... (2 Replies)
Discussion started by: nipodrom
2 Replies
Login or Register to Ask a Question
rdiff(1)						      General Commands Manual							  rdiff(1)

NAME
rdiff - compute and apply signature-based file differences SYNOPSYS
rdiff [options] signature old-file signature-file rdiff [options] delta signature-file new-file delta-file rdiff [options] patch basis-file delta-file new-file USAGE
You can use rdiff to update files, much like rsync does. However, unlike rsync, rdiff puts you in control. There are three steps to updating a file: signature, delta, and patch. DESCRIPTION
In every case where a filename must be specified, - may be used instead to mean either standard input or standard output as appropriate. Be aware that if you do this, you'll need to terminate your options with -- or rdiff will think you are passing it an empty option. RETURN VALUE
0 for successful completion, 1 for environmental problems (file not found, invalid options, IO error, etc), 2 for a corrupt file and 3 for an internal error or unhandled situation in librsync or rdiff. SEE ALSO
librsync(3) AUTHOR
Martin Pool <mbp@samba.org> The original rsync algorithm was discovered by Andrew Tridgell. rdiff development has been supported by Linuxcare, Inc and VA Linux Systems. $Date: 2002/01/25 21:25:34 $ rdiff(1)