LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices


Reply
  Search this Thread
Old 07-12-2016, 08:59 PM   #16
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,779

Rep: Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212

Quote:
Originally Posted by Dickster2 View Post
OK, then what options allow me I do this: rsync -apu --stats --delete-during --modify-window=2 dir /Volumes/disk
where "dir' already exists at /Volumes/disk BUT that target "dir" contains obsolete directories that are no longer defined in the source "dir"? Some of those obsolete directories are empty, and others are NOT empty. I want ALL obsolete directories, and their contents, to be deleted.
Just like you wrote it. When I try a command like that, it does just what you say you wanted.
Code:
$ rsync -apuv --delete-during dir1 destVol
sending incremental file list
dir1/
deleting dir1/ghi/
deleting dir1/def/def1
deleting dir1/def/
deleting dir1/abc/
Directories "abc/", "def/", and "ghi/" were present in destVol/, not in the source directory. Destination directory "destVol/def/" contained a file "def1". All were deleted.
 
1 members found this post helpful.
Old 07-12-2016, 09:18 PM   #17
Dickster2
LQ Newbie
 
Registered: Jul 2016
Location: Mountain View, CA
Posts: 23
Blog Entries: 1

Rep: Reputation: Disabled
My apology

As soon as I posted it, I tried it, and it does (indeed) delete obsolete directories. The reason I didn't believe that was from other posts that claimed they couldn't delete non-empty directories, only the empty variety. I must have missed some "dir/*" type of case. My whole concern about this is work-related, and "rsync between two machines is failing to delete stuff. My only problem is that I don't have access to the rsync commands. I suspect those who do have access aren't using --delete option properly, or are specifying dir/* types of sources. I'll ask them about it.

Thanks for your responses. It has helped me a lot.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Is there an option to force an x window app to always be on top? bino_linux Linux - Desktop 2 09-21-2010 08:33 AM
how can I load a kernel 2.6 module with the -f force option ? kerneluser Linux - Newbie 1 01-22-2010 01:23 AM
Using the --force option in Clonezilla Completely Clueless Linux - Software 0 11-23-2008 02:38 PM
rsync with -d option tate_harmann Linux - Newbie 2 09-20-2006 01:58 PM
APT::Force-LoopBreak option bboy8012 Linux - Newbie 7 11-12-2005 12:07 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora

All times are GMT -5. The time now is 01:46 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration