- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- how to tar all files ending in .dat and one file e...
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
Discussions
Discussions
Discussions
Forums
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
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-30-2003 08:12 AM
тАО05-30-2003 08:12 AM
Thanks for the help.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-30-2003 08:20 AM
тАО05-30-2003 08:20 AM
Re: how to tar all files ending in .dat and one file ending in .dmp?
Also you can list all your files from the prompt: "tar cvf /tmp/tarfile *.dat FILE.dmp".
Confirm this with "tar tvf /tmp/tarfile"
Chris
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-30-2003 08:23 AM
тАО05-30-2003 08:23 AM
Re: how to tar all files ending in .dat and one file ending in .dmp?
assuming your directory is /YOURDIR andyour tape device /dev/rmt/0m
To save all the contents of your directory
tar -cvf /dev/rmt/0m /YOURDIR
To save just *.dmp and *.dat file in your dir
tar -cvf /dev/rmt/0m /YOURDIR/*.dmp /YOURDIR/*.dat
this will propmt each file to stdout.
if you want to redirect output also to an inventory file
tar -cvf /dev/rmt/0m /YOURDIR
| tee -a /tmp/inventory.log
HTH,
Massimo
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-30-2003 08:23 AM
тАО05-30-2003 08:23 AM
Solutiontar cvf /tmp/newfile.dmp *.dat
To read the contents of the tape, assuming drive 0:
tar tvf /dev/rmt/0m
HTH
mark
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-30-2003 09:45 AM
тАО05-30-2003 09:45 AM
Re: how to tar all files ending in .dat and one file ending in .dmp?
tar -cvf /dev/rmt/0m /mydir | tee -a /tmp/inventory.log
I see nothing in the inventory.log. So I went ahead and did this
tar tvf /dev/rmt/0m | tee -a /tmp/inventory.log
My question: Should the inventory.log show the size increase when I to a ps -ef | grep inventory.log?
The tar tvf seems to do nothing and it is not piping the output to the inventory.log file. What is the problem here?
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-30-2003 10:51 AM
тАО05-30-2003 10:51 AM
Re: how to tar all files ending in .dat and one file ending in .dmp?
HTH
Umapathy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-30-2003 10:53 AM
тАО05-30-2003 10:53 AM
Re: how to tar all files ending in .dat and one file ending in .dmp?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-02-2003 06:39 AM
тАО06-02-2003 06:39 AM
Re: how to tar all files ending in .dat and one file ending in .dmp?
one more tipp for working with tar:
Most times it is better to work with relative pathes than with absolute.
So ./YOURDIR is better for extracting the files later because then the directory 'YOURDIR' and the files are created relative to your current directory.
Regards
Volkmar