前回のxorrisoの簡単な使い方に続き,
メディアを指定するオプション
xorrisoでは-devオプションで操作するメディアを指定します。このオプションでは"-dev /dev/
"-dev"オプションに存在しないファイルを指定した場合は,
複数の光学ドライブ間で内容をコピーしたり,
たとえば,
ISOイメージへファイルを追加するオプション
前回簡単に触れたように,
ISOイメージに書き出すファイルやディレクトリを指定するために,
"-map"には亜種として,
以下,
-addオプション
-addオプションに関するmanページの記述は以下の通りです。参考のために私訳を付けておきます。
-add pathspec [...] | disk_path [***] Insert the given files or directory trees from filesystem into the ISO image. If -pathspecs is set to "on" or "as_mkisofs" then pattern expansion is always disabled and character '=' has a special meaning. It separates the ISO image path from the disk path: iso_rr_path=disk_path
指定されたファイルやディレクトリツリーをファイルシステムからISOイメージに書き出す。-pathspecsオプションに"on"か"as_
-addオプションは,
xorrisoでは,
手元のNHKフォルダに
$ ls -l NHK 合計 251,658,240 -rw-r--r--+ 1 kojima users 5,485,197 6月 12日 11:10 ラジオ英会話_2017_04_001.m4a -rw-r--r--+ 1 kojima users 5,485,197 6月 12日 11:10 ラジオ英会話_2017_04_002.m4a -rw-r--r--+ 1 kojima users 5,485,449 6月 12日 11:10 ラジオ英会話_2017_04_003.m4a ...
これらのファイルをISOイメージ上の"ラジオ英会話"ディレクトリに書き出したい場合,
$ xorriso -dev disc01.iso -pathspecs on -add ラジオ英会話=NHK GNU xorriso 1.4.6 : RockRidge filesystem manipulator, libburnia project. Drive current: -dev 'disc01.iso' Media current: stdio file, overwriteable Media status : is blank Media summary: 0 sessions, 0 data blocks, 0 data, 122g free Added to ISO image: directory '/ラジオ英会話'='/home/kojima/NHK' xorriso : UPDATE : 21 files added in 1 seconds xorriso : UPDATE : Writing: 5488s 10.2% fifo 0% buf 50% ...
"iso_
$ xorriso -dev disc01.iso -pathspecs on \ -add episode01.m4a=NHK/ラジオ英会話_2017_04_001.m4a \ episode02.m4a=NHK/ラジオ英会話_2017_04_002.m4a \ episode03.m4a=NHK/ラジオ英会話_2017_04_003.m4a GNU xorriso 1.4.6 : RockRidge filesystem manipulator, libburnia project. xorriso : NOTE : Loading ISO image tree from LBA 0 xorriso : UPDATE : 41 nodes read in 1 seconds Drive current: -dev 'disc01.iso' Media current: stdio file, overwriteable Media status : is written , is appendable Media summary: 1 session, 107186 data blocks, 209m data, 122g free Volume id : 'ISOIMAGE' Added to ISO image: file '/episode01.m4a'='/home/kojima/NHK/ラジオ英会話_2017_04_001.m4a' Added to ISO image: file '/episode02.m4a'='/home/kojima/NHK/ラジオ英会話_2017_04_002.m4a' ...
書き出したISOイメージの内容を確認するには,
$ xorriso -dev disc01.iso -find GNU xorriso 1.4.6 : RockRidge filesystem manipulator, libburnia project. xorriso : NOTE : Loading ISO image tree from LBA 0 ... '.' './episode01.m4a' './episode02.m4a' './episode03.m4a' './ラジオ英会話' './ラジオ英会話/ラジオ英会話_2017_04_001.m4a' './ラジオ英会話/ラジオ英会話_2017_04_002.m4a' ...
-cprオプション
-cprはシェルから使える"cp -r"と同様の機能を持ったオプションです。このオプションのmanページの記述は以下の通りです。
-cpr disk_path [***] iso_rr_path Insert the given files or directory trees from filesystem into the ISO image. The rules for generating the ISO addresses are similar as with shell command cp -r. Nevertheless, directories of the iso_rr_path are created if necessary. Especially a not yet existing iso_rr_path will be handled as directory if multiple disk_paths are present. The leafnames of the multiple disk_paths will be grafted under that directory as would be done with an existing directory. If a single disk_path is present then a non-existing iso_rr_path will get the same type as the disk_path.
ファイルシステム上にある指定したファイルやディレクトリツリーをISOイメージに書き出す。ISOイメージ上のファイル名生成ルールはシェルコマンドのcp -rと同様だが,
-cprオプションを使えば,
指定方法行の"disk_
このオプションを使えば,
$ xorisso -dev disc02.iso -disk_pattern on \ -cpr NHK/ラジオ英会話_2017_04* 2017_04 -- \ -cpr NHK/ラジオ英会話_2017_05* 2017_05 -- \ ... Added to ISO image: file '/2017_04/ラジオ英会話_2017_04_001.m4a'='/home/kojima/NHK/ラジオ英会話_2017_04_001.m4a' Added to ISO image: file '/2017_04/ラジオ英会話_2017_04_002.m4a'='/home/kojima/NHK/ラジオ英会話_2017_04_002.m4a' ... Added to ISO image: file '/2017_05/ラジオ英会話_2017_05_001.m4a'='/home/kojima/NHK/ラジオ英会話_2017_05_001.m4a' Added to ISO image: file '/2017_05/ラジオ英会話_2017_05_002.m4a'='/home/kojima/NHK/ラジオ英会話_2017_05_002.m4a' ...