synctree

Langue: en

Version: 315102 (ubuntu - 07/07/09)

Section: 1 (Commandes utilisateur)

NAME

synctree --- synchronize a directory tree using a set of rules

SYNOPSIS

synctree [options] [lpath [rpath] ]

DESCRIPTION

This manual page documents briefly the synctree command.

synctree is a program that compares two directory trees and transfers files between them based on a set of options and/or rules. These cover anything from using the newest files from either tree to comparing the bitrates of audio files and transcoding them as needed.

OPTIONS

Compare the directory tree lpath to the tree rpath. By default, any files that are missing from rpath are copied over from lpath. If the -d option is specified, any directories in lpath that are missing in rpath are created.
 

If the -f option is specified, the files contents are also compared and any in rpath that are different from lpath are overwritten with the files in lpath. If the -n option is specified, the newest file is taken from one side and copied to the other.
 

-d
Dry run. Don't actually do anything and print the command instead.
-D
Do NOT create directories if they are not present on the target.
-f
Compare the file contents as well.
-F
Force overwrite to 'rpath', even if they are the same.
-h
Show summary of options.
-n
Take the newest file instead of the file in 'lpath'.
-r=rules
Follow the rules in file 'rules'.
-R
Do not recurse through directories.
-v
Enable verbose output.

RULES

If a rules file is specified, the command line options will override any options set in the rules. The 'lpath' and/or 'rpath' may also be specified there.
 

The rules file format is a test file with one rule per line. In general, each rule consists of a key and value pair separated by a colon ":" or equal sign "=". With the exception of the general rules, the specific interpretation of the rules depends on the rules file type (see the type rule).
 

General

These rules are valid for any rule file type, however the defaults may be overridden for certain types. Most of these rules can be overridden by command line arguments.

type: type
Type of rules file. Supported types are: normal, sorune (default is normal).
lpath|source: path
Specifiy the source path (lpath command line parameter) to synchronize from.
rpath|target: path
Specifiy the target path (rpath command line parameter) to synchronize to.
createdirs: yes|no
Create directories in the target path that are missing from the source path (default is yes).
comparefiles: yes|no
Compare the file contents and copy any from the source path that are missing from the target path (default is no).
overwrite: yes|no
Force overwrite of the target (or newest) files, even if they appear to match (default is no).
newest
Take the newest file from the source or target, instead of always taking the file form the source (default is no).
recurse
Recursively search each directory that is specified (default is yes).
verbose
Enable verbose output (default is no).
list
Specifiy a list of values, one per line, until another list rule is encountered. The list will be given the name specified as the value for the list rule. The meaning of the name depends on the rules file type. The special list name end will also terminate a list if a new list rule does not follow in the rules file.
 

Sorune

These rules are valid for the sorune rules file type. Its purpose is to handle the actual transfer of files to the Neuros while also adding them to the Neuros Database via the sorune Neuros database manipulation tool. After file synchronization is complete, sorune is invoked to synchronize the database. Since the files have already been transferred, only the Neuros Database is updated. sorune does not check that the files are the same between the host and the Neuros; only that they exist on the Neuros. The idea is that synctree can peel/transcode the files into a type that is fully supported by the Neuros while sorune can handle the database manipulation.

The lpath/source rule may be omitted, in which case synctree will try to read he source path from the user's musichome setting in their .sorunerc file.
 

peelat
The maximum file bitrate allowed before the file will be peeled/transcoded to the bitrate specified by the peelto rule.
peelto
The bitrate to peel/transcode the file to if the source bitrate exceeds the value specified by the peelat rule.
The Neorus has trouble playing files at bitrates higher than 192 kbps. Currently, neither MP3 nor OGG Vorbis files can actually be bitrate "peeled" (though the OGG Vorbis format should support it at some point in the future). In those cases, the files are transcoded instead. Obviously, transcoding takes a great deal of time and it is recommended that a local copy of the Neuros backpack file system be made on the host machine. The best way to do this is to copy the entire partition directly (replace /dev/sdx with the block device that your neuros occupies):
dd if=/dev/sdx of=neuros.bin bs=512
Then mount the image via the loopback device:
mount -t vfat -o loop neuros.bin /mnt
To minimize quality loss, make sure the source material is at a sufficiently high bitrate and that peelat is also set fairly high. Peeling at 192 kbps to 160 kbps is a good place to start (256 kbps actual source recommended) for the HD backpack. This will also save disk space on the backpack, making room for more music.
list: path
List of paths to be added to the Neuros. See the list rule above for syntax information.
list: file
List of files to be added to the Neorus. See the list rule above for syntax information.

SEE ALSO

sorune(1), oggenc(1), oggdec(1), ogginfo(1), vorbiscomment(1)

AUTHOR

This manual page was written by Russ W. Knize <rknize@yahoo.com>; for the Debian system (but may be used by others). Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License, Version 2 any later version published by the Free Software Foundation.
 

On Debian systems, the complete text of the GNU General Public License can be found in /usr/share/common-licenses/GPL.