selecting some kind of files using the resync command

Angelo Moreschini mrangelo.fedora at gmail.com
Fri Oct 24 08:08:49 UTC 2014


I was able to solve this problem (synchronization of the files) from line
command
launching a script that I wrote....

But I would like also to execute  the script AUTOMATICALLY at the boot...

Joachim  suggest me to try with /etc/rc.local

I saw that this file ( /etc/rc.local) is not anymore supported in the
latest version of Fedora (http://joshua14.homelinux.org/blog/?p=1377)

So* I wrote my new file /etc/rc.local*.
But  I think that (perhaps) I also have to do some special setting in order
that
the file /etc/rc.local is used at the boot...

So I would like to know if it need to do some special setting in order that
the file  /etc/rc.local that I wrote it works at the boot.

Thank you

Regards

Angelo








On Wed, Oct 22, 2014 at 8:55 PM, Angelo Moreschini <
mrangelo.fedora at gmail.com> wrote:

> OK...
> thank you very much to all
>
> Angelo
>
> On Wed, Oct 22, 2014 at 4:34 PM, Ian Malone <ibmalone at gmail.com> wrote:
>
>> On 22 October 2014 10:41, Angelo Moreschini <mrangelo.fedora at gmail.com>
>> wrote:
>> > Hi,
>> >
>> > I am able to backup files with this command:
>> >  rsync -av --delete /home/programmers/Labels /media/saved_labels
>> >
>> > but I am not able to select some kind of files doing the backup
>> >
>> > I tried in many different way:
>> >
>> >  rsync -av --delete /home/programmers/Labels/*.java /media/saved_lab
>> >  rsync -avr --delete /home/programmers/Labels/*.java /media/saved_lab
>> >
>> > The message that I get is :
>> >
>> > sending incremental file list
>> > rsync: link_stat
>> "/home/programmers/java/PROJECTS_development/Labels/*.java"
>> > failed: No such file or directory (2)
>> >
>> > sent 18 bytes  received 12 bytes  60.00 bytes/sec
>> > total size is 0  speedup is 0.00
>> > rsync error: some files/attrs were not transferred (see previous errors)
>> > (code 23) at main.c(1165) [sender=3.1.0]
>> >
>> >
>> > ===========
>> >
>> > I would like to know how to start this command (after it is inside a
>> shell
>> > script) at the boot.
>>
>> Both Bill Oliver and Patrick O'Callaghan have given good suggestions,
>> but I thought it might be helpful to also explain why this isn't
>> working the way you might think it should.
>>
>> rsync -av --delete /home/programmers/Labels/*.java /media/saved_lab
>>
>> Will get expanded by the shell to any files that match the glob
>> pattern /home/programmers/Labels/*.java that is to say if there is a
>> file /home/programmers/Labels/a.java then it will get replaced by
>> that, if there is more than one file matching *.java in that directory
>> then it will get expanded to all the matches. Once that's done rsync
>> gets called with the resulting arguments. The matching only matches
>> files in that directory, it's performed by the shell (not rsync) and
>> doesn't descend into subdirectories. Once rsync gets it it will either
>> have the full path to the (likely non-existent) file "*.java" or a
>> list of files in the Labels directory which all end .java. If some of
>> those happen to be directories it will recurse into them as the -a
>> option tells it to, but likely they'll be regular files and they will
>> be the only ones to get copied.
>>
>> If you want recursive descent and matching within subdirectories (eg.
>> you've got .java files under Labels/Code/) then you either need a find
>> command to collect them and pass them to rsync or use rsync's "FILTER
>> RULES" (see man rsync).
>>
>> --
>> imalone
>> http://ibmalone.blogspot.co.uk
>> --
>> users mailing list
>> users at lists.fedoraproject.org
>> To unsubscribe or change subscription options:
>> https://admin.fedoraproject.org/mailman/listinfo/users
>> Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct
>> Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
>> Have a question? Ask away: http://ask.fedoraproject.org
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.fedoraproject.org/pipermail/users/attachments/20141024/097559cb/attachment-0001.html>


More information about the users mailing list