Every sysadmin know that tar program do not accept wildcards for extract files so if you want to extract only one or few files you should play with construction like this:
tar xvf archive.tar `tar tvf archive.tar|grep string`
But on complex requests will be need to do it several times and if archive reside on tape (do not forget from where come the name of utility tar) this can take long time. Instead is much better to deal with files:
tar tvf archive.tar>/tmp/somefilename
make some filtering on the listing
tar xvf archive.tar `cat /tmp/somefilename`
P.S. I use cat to make command work independently (almost) of version of tar, UNIX flavour or Linux
Subscribe to:
Post Comments (Atom)
Compressed tar archive
There are some cases when you want to create compressed tar archive but you do not have enough disk space to keep original files and tar arc...
-
To build firewall under AIX is sample, but as each host based firewall should be done careful 1. Prerequisites To start firewall in AIX yo...
-
There are some cases when you want to create compressed tar archive but you do not have enough disk space to keep original files and tar arc...
-
4. Its time for some system administrator tasks. Oracle ASM need special mark of disks will work with 4.1. Because of some reason (i don...
No comments:
Post a Comment