[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Duplicity-talk] File / Directory names with spaces
From: |
Tim Riemenschneider |
Subject: |
Re: [Duplicity-talk] File / Directory names with spaces |
Date: |
Tue, 06 Jul 2010 20:05:37 +0200 |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.10) Gecko/20100620 Iceowl/1.0b1 Icedove/3.0.5 |
Am 06.07.2010 11:44, schrieb "Peter Valdemar Mørch (Lists)":
> Richard Scott richard-at-pointb.co.uk |Lists/Send to lists| wrote:
>> --- code start ---
>> find / -type f -name .duplicity-ignore -print0 | while read -d $'\0'
>> file
>> do
>> find / | grep "^$(dirname "$file")" >> /var/tmp/exclude.list
>> done
>> --- code end ---
>
> Yikes!
>
> Am I reading this shell snippet correctly?:
>
> It searches the entire file system for files called .duplicity-ignore,
> and for each file it finds, it searches the entire file system
> *again*? So if you have 45 .duplicity-ignore files, you end up
> searching the entire file system 46 times? Lets at least hope you
> don't have any slow network attached storage.
>
> Wouldn't it really help to avoid that nested "find /"? I haven't tried
> it, but would this work instead?:
>
> --- code start ---
> # Delete any pre-existing file for good measure so it doesn't
> # just grow and grow and grow
> rm -f /var/tmp/exclude.list
>
> find / -type f -name .duplicity-ignore -print0 | while read -d $'\0' file
> do
> echo $(dirname "$file") >> /var/tmp/exclude.list
> done
> --- code end ---
>
> Peter
shouldn't "duplicity --exclude-if-present .duplicity-ignore [other
options]" do the same?
cu
Tim
- [Duplicity-talk] amazon s3 speed, jb, 2010/07/04
- Re: [Duplicity-talk] amazon s3 speed, Peter Schuller, 2010/07/05
- Re: [Duplicity-talk] amazon s3 speed, Denis Klimov, 2010/07/05
- Re: [Duplicity-talk] amazon s3 speed, Peter Schuller, 2010/07/05
- Re: [Duplicity-talk] amazon s3 speed, Peter Schuller, 2010/07/05
- [Duplicity-talk] File / Directory names with spaces, Bob Smither, 2010/07/05
- Re: [Duplicity-talk] File / Directory names with spaces, Richard Scott, 2010/07/06
- Re: [Duplicity-talk] File / Directory names with spaces, Peter Valdemar Mørch (Lists), 2010/07/06
- Re: [Duplicity-talk] File / Directory names with spaces, Richard Scott, 2010/07/06
- Re: [Duplicity-talk] File / Directory names with spaces,
Tim Riemenschneider <=
- Re: [Duplicity-talk] File / Directory names with spaces, Richard Scott, 2010/07/06
- Re: [Duplicity-talk] File / Directory names with spaces, edgar . soldin, 2010/07/06
- Re: [Duplicity-talk] File / Directory names with spaces, Ed Blackman, 2010/07/06
- Re: [Duplicity-talk] File / Directory names with spaces, Richard Scott, 2010/07/07
- [Duplicity-talk] Another Newbie Question - sorry, Bob Smither, 2010/07/07
- Re: [Duplicity-talk] Another Newbie Question - sorry, Jacob Godserv, 2010/07/08
- Re: [Duplicity-talk] Another Newbie Question - sorry, Bob Smither, 2010/07/08
- Re: [Duplicity-talk] Another Newbie Question - sorry, Tim Riemenschneider, 2010/07/08
- Re: [Duplicity-talk] Another Newbie Question - sorry, Bob Smither, 2010/07/08
- Re: [Duplicity-talk] File / Directory names with spaces, Bob Smither, 2010/07/09