- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- tar question
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-07-2008 09:17 AM
05-07-2008 09:17 AM
i have a tar file named tests_2008.tar , i have two tests files wich have to be added into the file named tests_2008.tar .. how can i do that?
1.- do i have to uncompress the file and after add them?
please let me know.
thanks in advance.
Regards :)
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-07-2008 09:24 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-07-2008 09:33 AM
05-07-2008 09:33 AM
Re: tar question
do not mind if i use a different absolute path for each file?
i mean ..
==================
---- CASE 1 ----
==================
tests_2008.tar file has files added with absolute path:
/home/robert/test1.txt
/home/robert/test2.txt
/home/robert/test3.txt
/home/robert/test4.txt
/home/robert/test5.txt
/home/robert/test6.txt
question 1:
if the first file to be added is located into /home/dani/test7.txt
and the second file to be added is located into /home/yami/test8.txt
how do i have to use tar commando to add it into the file tests_2008.tar and they be located into /home/robert/ directory?
do i have first to copy the files to be added into /home/robert/ directory? and if i do not have permissions?
==================
---- CASE 1 ----
==================
If the tar file tests_2008.tar contains files without absolute path,
question 1
how do i add the two files to be added without absolute path?
how do i add the two files to be added with absolute path (/home/dani/test7.txt and /home/dani/test8.txt) ?
please let us know.
thaks a lot, thanks in advance.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-07-2008 10:33 AM
05-07-2008 10:33 AM
Re: tar question
Yes you can add files by absolute path.
You might run into trouble if you mix and match.
If every file's absolute path is preserved, that will be fine. But check the file with tar tvf and see what it looks like.
You may need to rebuild with an extra option to preserve full path.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-07-2008 10:39 AM
05-07-2008 10:39 AM
Re: tar question
> [...]
> ---- CASE 1 ----
> [...]
> ---- CASE 1 ----
> [...]
Right.
> [...] absolute path [...]
Often, creating a "tar" archive with absolute
paths is not a good idea. Modern "tar"
programs have features which can help, but
old ones typically don't.
The paths in the "tar" archive are the paths
you specify when creating the archive. If
you want absolute paths, then specify
absolute paths. If you want relative paths,
then specify relative paths. "tar" doesn't
care.
> [...] and if i do not have permissions?
Then I guess that you won't be able to do it.
In general, it helps to think about how you
will be extracting the files from the archive
before you create the archive.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-07-2008 12:30 PM
05-07-2008 12:30 PM
Re: tar question
Having said that some admins like to save money, I must tell you that this a very unstable way to keep backups. One mistake and the entire tarfile or tape is useless.
tar does not compress anything. If you want to reduce the size of the tarfile, you must run compress on the tarfile.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-07-2008 12:37 PM
05-07-2008 12:37 PM
Re: tar question
you don't. tar will store the absolute path name that was entered (or the relative path name), but has no mechanism that allows the stored path in the archive to be different then the file path originally entered.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-07-2008 12:37 PM
05-07-2008 12:37 PM
Re: tar question
Two reasons why I didn't give you the command syntax:
1) The tar man page in HP-UX is excellent.
2) Whole country here is on vacation and I don't have access to an HP-UX system.
But again, I emphasize what you want to do is quite possible assuming tar tvf does not show problems that force you to rebuild.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com