0

I need to write an LTO of single frame files (DPX) in frame number order.

When using the standard command below the frames are written out of order.

tar -b 1024 -cvf /dev/nst0 <directory>

When using the below command I get an argument list too long response

tar -b 1024 -cvf /dev/tape ls <directory>

Here is how the files are laid out (I am starting the archive from the directory above the below):

DIRECTORY_NAME/FILE_NAME.00259200.dpx - 00289805.dpx

Any advice would be great!

Thank you!

1 Answer 1

0

GNU tar can read a list of files to add to the archive from a file or stdin with the -T option. Assuming the files in question can be sorted lexicographically:

find <directory> -type f | sort | tar -T - -b 1024 -cvf /dev/tape
1
  • You could also pipe ls directly to tar, but you'd lose the leading directory name, and you'll need to tell tar to change (-C) to the directory so it can find the files. You could also post-process the output of ls with sed or similar to prepend the directory name, then pipe that to tar: /bin/ls mydir/ | sed 's/^/mydir\//' | tar -T - -b 1024 -cvf /dev/tape. Note that if you use ls, you'll want to avoid colors (ANSI escape codes) in the output, so use the full path or escape the command with a backslash.
    – zackse
    Feb 12, 2015 at 21:56

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .