- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- tar command does nothing
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
03-10-2010 06:10 AM
03-10-2010 06:10 AM
I am trying to write 2 directories to tape using tar, using the command as described in the man page:
" Archive files from /usr/include and /etc:
tar cv -C /usr/include -C /etc"
(except that I am backing up two other directories)
What happens is that the tape LED flashes for a few seconds, then tar stops.
No error or status messages are displayed anytime.
Running
tar tv
displays nothing written to tape.
I have also tried tar
-cvf /dev/rmt/0m ........
with no luck.
What could cause this?
(The OS version is HP-UX 10.20)
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-10-2010 06:15 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-10-2010 06:24 AM
03-10-2010 06:24 AM
Re: tar command does nothing
Seems to me that the -C options is just there for confusion.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-10-2010 06:48 AM
03-10-2010 06:48 AM
Re: tar command does nothing
No, you just didn't use it correctly.
You missed the '.' after the directory names in the man page example.
tar cv -C /usr/include . -C /etc .
The man page states:
-C directory
causes tar to perform a chdir() to directory (see chdir(2)). Subsequent file and -C directory arguments are relative to directory. This allows multiple directories not related by a close or common parent to be archived using short relative path names.
Basically the '.' after the path indicates to get all files in that path BUT to use relative path names.
So, the files archived from /usr/include would be stored in the tar archive as filea, fileb, filec, etc. rather than /usr/include/filea, /usr/include/fileb.
When paired with the '-C /etc .' you would get ALL files with relatives paths, so you would have filea, fileb, filec, passwd, hosts, group, nsswitch.conf instead of /usr/include/filea, /usr/include/fileb, /etc/hosts, /etc/passwd, /etc/group, etc.
The way Rita showed WILL cause all files to have the FULL path name in the tar archive (/usr/include/filea, /etc/hosts, etc.).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-10-2010 08:17 AM
03-10-2010 08:17 AM
Re: tar command does nothing
You can use pax(1) or gnu tar to remove the initial "/" in these files.