![]() |
|
|||
![]()
Just now I wanted to create a tarball of some files. Normally I use something like this:
Code:
$ tar cvzf MyFiles.tgz file1 file2 file3 From tar(1): Code:
-I file This is a positional argument which reads the names of files to archive or extract from the given file, one per line. Code:
newbook.xsl newbook-vbul-html.xsl skeleton-grep XSL OBSDsnapshot-tracking.xml newbook-test.xml Reformatting.xml xsl-templates.txt The first two attempts failed ![]() Code:
$ tar cvzf NewBook_xml.tgz -I FILES tar: Invalid file name argument usage: tar {crtux}[014578befHhjLmOoPpqsvwXZz] [blocking-factor | archive | replstr] [-C directory] [-I file] [file ...] tar {-crtux} [-014578eHhjLmOoPpqvwXZz] [-b blocking-factor] [-C directory] [-f archive] [-I file] [-s replstr] [file ...] $ tar cvzf NewBook_xml.tgz -I ./FILES tar: Invalid file name argument usage: tar {crtux}[014578befHhjLmOoPpqsvwXZz] [blocking-factor | archive | replstr] [-C directory] [-I file] [file ...] tar {-crtux} [-014578eHhjLmOoPpqvwXZz] [-b blocking-factor] [-C directory] [-f archive] [-I file] [-s replstr] [file ...] Code:
$ hexdump -C FILES 00000000 6e 65 77 62 6f 6f 6b 2e 78 73 6c 0a 6e 65 77 62 |newbook.xsl.newb| 00000010 6f 6f 6b 2d 76 62 75 6c 2d 68 74 6d 6c 2e 78 73 |ook-vbul-html.xs| 00000020 6c 0a 73 6b 65 6c 65 74 6f 6e 2d 67 72 65 70 0a |l.skeleton-grep.| 00000030 58 53 4c 0a 4f 42 53 44 73 6e 61 70 73 68 6f 74 |XSL.OBSDsnapshot| 00000040 2d 74 72 61 63 6b 69 6e 67 2e 78 6d 6c 0a 6e 65 |-tracking.xml.ne| 00000050 77 62 6f 6f 6b 2d 74 65 73 74 2e 78 6d 6c 0a 52 |wbook-test.xml.R| 00000060 65 66 6f 72 6d 61 74 74 69 6e 67 2e 78 6d 6c 0a |eformatting.xml.| 00000070 78 73 6c 2d 74 65 6d 70 6c 61 74 65 73 2e 74 78 |xsl-templates.tx| 00000080 74 0a 0a |t..| Code:
$ cat -n FILES 1 newbook.xsl 2 newbook-vbul-html.xsl 3 skeleton-grep 4 XSL 5 OBSDsnapshot-tracking.xml 6 newbook-test.xml 7 Reformatting.xml 8 xsl-templates.txt 9 Code:
$ tar cvzf NewBook_xml.tgz -I FILES newbook.xsl newbook-vbul-html.xsl skeleton-grep XSL OBSDsnapshot-tracking.xml newbook-test.xml Reformatting.xml xsl-templates.txt $ tar tvzf NewBook_xml.tgz -rw-r--r-- 1 j65nko j65nko 10450 Feb 13 23:29 newbook.xsl -rw-r--r-- 1 j65nko j65nko 11555 Feb 13 23:26 newbook-vbul-html.xsl -rwxr-xr-x 1 j65nko j65nko 62 Jan 1 2005 skeleton-grep lrwxr-xr-x 1 j65nko j65nko 0 Feb 14 00:04 XSL -> newbook.xsl -rw-r--r-- 1 j65nko j65nko 48907 Dec 2 2009 OBSDsnapshot-tracking.xml -rw-r--r-- 1 j65nko j65nko 1907 Feb 13 23:43 newbook-test.xml -rw-r--r-- 1 j65nko j65nko 23958 Dec 23 2008 Reformatting.xml -rw-r--r-- 1 j65nko j65nko 2095 Feb 15 05:04 xsl-templates.txt ![]()
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump |
|
||||
![]()
What happens when You do it like that: # cat FILES | tar -czvf NewBook_xml.tgz -I - (of course with the 'faulty' FILES file)
I remember doing it like that and it always worked ![]()
__________________
religions, worst damnation of mankind "If 386BSD had been available when I started on Linux, Linux would probably never had happened." Linus Torvalds Linux is not UNIX! Face it! It is not an insult. It is fact: GNU is a recursive acronym for “GNU's Not UNIX”. vermaden's: links resources deviantart spreadbsd |
|
||||
![]()
@IdOp
That depends on how many files You want to back up ... try to use Your method with 50 000+ files ![]()
__________________
religions, worst damnation of mankind "If 386BSD had been available when I started on Linux, Linux would probably never had happened." Linus Torvalds Linux is not UNIX! Face it! It is not an insult. It is fact: GNU is a recursive acronym for “GNU's Not UNIX”. vermaden's: links resources deviantart spreadbsd |
|
||||
![]()
@IdOp
Its not that scarry since $( cat NOTES ) will 'hide' all that in only these chars, but after expansion You will just hit the ARG_MAX: http://www.in-ulm.de/~mascheck/various/argmax/
__________________
religions, worst damnation of mankind "If 386BSD had been available when I started on Linux, Linux would probably never had happened." Linus Torvalds Linux is not UNIX! Face it! It is not an insult. It is fact: GNU is a recursive acronym for “GNU's Not UNIX”. vermaden's: links resources deviantart spreadbsd |
|
||||
![]()
Welcome ;p
__________________
religions, worst damnation of mankind "If 386BSD had been available when I started on Linux, Linux would probably never had happened." Linus Torvalds Linux is not UNIX! Face it! It is not an insult. It is fact: GNU is a recursive acronym for “GNU's Not UNIX”. vermaden's: links resources deviantart spreadbsd |
![]() |
Tags |
hexdump, tar, tar -i file |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
What does your .*shrc file look like? | TerryP | Off-Topic | 13 | 23rd February 2012 11:28 PM |
File Restore | plexter | OpenBSD General | 4 | 24th November 2009 08:06 PM |
PHP read file contents - Maximum file size | cksraj | Programming | 1 | 21st September 2009 11:38 AM |
File system at more than 100% | michaelrmgreen | FreeBSD General | 4 | 28th July 2008 01:52 PM |
file:/// | mfaridi | FreeBSD Security | 3 | 27th July 2008 02:18 PM |