- 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
09-02-2004 04:45 AM
09-02-2004 04:45 AM
I have a directory with many log files I need to send someone. These are in /var/adm/Log_Files and I have cd /var/adm.
What I want to do is tar this directory up from /var/adm how do I go about this.
Is the command tar -cvf /var/adm/Log_Files log.tar
Thanks
Simon
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-02-2004 04:49 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-02-2004 04:50 AM
09-02-2004 04:50 AM
Re: tar question
If you want to tar it up with absolute path name, then it would be
tar cvf log.tar /var/adm/Log_files
Ensure you have enough space in the current directory (it can be anything). When you untar it, it will create a directory /var/adm/Log_files (if it doesn't exist) and restore the files.
If you want the relative path, then
cd /var/adm
tar cvf log.tar Log_files
When you untar it, it will create Log_files directory (if it doesn't exist) in the current directory and untar the files.
-Sri
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-02-2004 04:52 AM
09-02-2004 04:52 AM
Re: tar question
It should be:
tar -cvf log.tar /var/adm/Log_Files
However, this means that whoever extracts these files is forced to put them back in the same directory structure.
why not do:
cd /var/adm/Log_Files
tar cvf /tmp/log.tar *
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-02-2004 05:14 AM
09-02-2004 05:14 AM