قم بتخزين الملفات من قائمة الملفات في tarball على IBM i - shell

StackOverflow https://stackoverflow.com//questions/21055776

سؤال

أريد إنشاء ملف tarfile من قائمة الملفات.
تحتوي قائمة الملفات على صفين

log1.dat
log2.dat

يبدو البرنامج النصي Shell كما يلي:

cd /temp/temp1 
tar -cvf test.tar -L inp.txt

يتم تخزين كافة الملفات في دير temp/temp1.يلقي qshell خطأ:

no file or directory with the name inp.txt

ولكن الملف موجود ويسمى inp.txt.

ال test.tar تم إنشاء و inp.txt يتم تخزينها في الأرشيف.لا أريد أن أضع inp.txt في كرة القطران - أريد تخزين الملفات المدرجة في ملف inp.txt.

ما الخطأ الذي يحدث؟

هل كانت مفيدة؟

المحلول

فقط PASE tar تقبل الأداة المساعدة [ -L InputList ] كمعلمة.

Usage: tar -{c|r|t|u|x} [ -BdDEFhilmopRUsvw ] [ -Number ] [ -f TarFile ]            
         [ -b Blocks ] [ -S [ Feet ] | [ Feet@Density ] | [ Blocksb ] ]           
         [ -L InputList ] [-X ExcludeFile] [ -N Blocks ] [ -C Directory ] File ...

Usage: tar {c|r|t|u|x} [ bBdDEfFhilLXmNopRsSUvw[0-9] ] ]                            
         [ Blocks ] [ TarFile ] [ InputList ] [ ExcludeFile ]                     
         [ [ Feet ] | [ Feet@Density ] | [ Blocksb ] ] [-C Directory ] File ...   

تأهيل المسار إلى الأداة المساعدة لاستخدام إصدار PASE:

/qopensys/usr/bin/tar -cvf test.tar -L inp.txt
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top