xorriso: how to find fixed-string filenames?

"G.raud" <[email protected]>
Newsgroups gmane.comp.audio.cd-record
Message-ID <[email protected]>
Listing selected files
----------------------

I want to list files found on an iso image.  The best way to list every
file would be, to my knowledge, the following:

  xorriso -indev image.iso -return_with WARNING 32 -report_about WARNING \
    -find / -exec lsdl

The -return_with WARNING is there to fail if no file could be found
(which is the case if image.iso is not a valid iso).  The -report_about
WARNING is there to avoid printing information that is not about the
files themselves.

I want to pass a fixed list of filenames to list.  The best way seems to
be to use -wholename and hope that filenames do not contain special
pattern characters:

  xorriso -indev image.iso -return_with WARNING 32 -report_about WARNING \
    -find / -wholename "$name1" -o -wholename "$name2" -exec lsdl

Is there a way to avoid the interpretation of these patterns by xorriso
or another way to list file with a fixed-string filename?

Remarks
-------

Note that selecting files is also useful for extracting (and other
actions) by removing unwanted paths first, but an alternative exists
thanks to the disabling of patterns for -cpx and -rm:

  xorriso -osirrox on -indev img.iso \
    -find / -not -wholename / -and -not -wholename "$escaped_name" -exec rm_r \
	-extract / . -rollback_end
  xorriso -osirrox on -iso_rr_pattern off -indev img.iso \
    -cp_rx "$include_name" "$(pwd)$include_name" \
	-rm_r "$exclude_name" -extract / . -rollback_end

Maybe adding a -find_pattern option or making -iso_rr_pattern enable/disable
the use of patterns by -find would be a good idea?

The system find has a similar issue, but there is a way to find fixed
filenames by using the option -exec and a system command (test and the
shell for string processing):

  name=$name find . -exec sh -c 'test "x${1##*/}" = x"$name"' script '{}' \; -print
    # $name is not passed on the command line to sh to avoid the interpretation
	# of {} by find!

Would you consider adding a -fexec to your -find to use a system command
to test a filename (and maybe more than the filename)?

Regards

-- 
G.raud Meyer


-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]
Archive: https://lists.debian.org/[email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.