All pastes #938833 Raw Edit

clueless

public text v1 · immutable
·published 2008-03-11 21:50 UTC
rendered paste body
Command: cat /mnt/p3/home/kerndocs/SCRATCH/cdrkit-1.0pre4/doc/mkisofs/README.sortSort the order of file data on the CD=====================================Note: this option does not sort the order of the file names that appearin the ISO9660 directory. It sorts the order in which the file data iswritten to the CD image.This option is useful in order to optimize the data layout on a CD.To use, type something like:mkisofs -o cdimage.iso -sort sort_file [other_options] cd_dirThe file 'sort_file' contains two columns of:filename	weightwhere filename is the whole name of a file/directory as mkisofs will see itand weight is a whole number between +/- 2147483647The files will be sorted with the highest weights first and lowest last.The default weight is zero.If the filename is a directory name, then all the files in that directory (andsub-directories) will use its weight as their default weight.e.g.If the directory 'cd_dir' contains two directories called 'dir1' and 'dir2'with files 'A', 'B' and 'C' in dir1 and 'X', 'Y' and 'Z', the the file'sort_file' could look something like:cd_dir/dir2	1000cd_dir/dir2/Y	2000cd_dir/dir1/B	-2000cd_dir/dir1/A	-8000Note: There must be only one space or tab character between the filename andthe weight and the weight must be the last characters on a line. The filenameis taken to include all the characters from the first in a line, up to, butnot including the last space or tab character on a line. This is to allowfor space characters to be in, or at the end of a filename.The command:mkisofs -o cdimage.iso -sort sort_file cd_dirwill sort the above file data as:cd_dir/dir2/Ycd_dir/dir2/Xcd_dir/dir2/Zcd_dir/dir1/Ccd_dir/dir1/Bcd_dir/dir1/ANote: files 'X' and 'Z' both have the weight 1000 - their sort order will thenbe the normal ISO9660 sort order (i.e. alphabetical in this case).File C will have the default weight of 0Warning: the filenames in the sort list MUST match the whole path as seen bymkisofs. i.e. in the above case, if the command line was:mkisofs -o cdimage.iso -sort sort_file ./cd_dirthen the sort_file filename will have to changed as accordingly.Notes=====CDs are written from the middle outwards. High weighted files will be nearerthe inside of the CD.Wildcards in the filename list should work.If a file appears more than once in the source directory tree, then the fileis only added once to the CD image - i.e. a hard linked file, or symboliclink if using the -f option. The file will be sorted according to thehighest weighting given to any of the linked files.Zero length files are not sorted - the 'start extent' *may* appear to be inthe middle of another file after sorting. This is because zero length filesare given the start extent after the last file added to the CD at that time.This address is not changed by the sorting, so it may appear that the fileaddress is in another file - however as they are zero length, this willnot matter!Directories are not sorted by this flag - directories HAVE to be in theISO9660 sort order - however, the files the directory entry points to, can beanywhere on the CD.Existing files from any previous sessions will not be sorted - they alreadyexist on the CD and can not be moved!I have no idea if this is really useful ...James Pearson 22-Nov-2001Any comments/problems to j.pearson@ge.ucl.ac.uk