- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- compress file
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
08-21-2005 06:50 PM
08-21-2005 06:50 PM
compress file
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2005 06:58 PM
08-21-2005 06:58 PM
Re: compress file
filename=`date '+%d%b%y-%I%p'`
tar cvf /
Does it solve what you want
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2005 07:01 PM
08-21-2005 07:01 PM
Re: compress file
It is allthough not suggested to archive all these files as many of these files will be opened by running processes.
Allthough try this by writing a small script and then calling this script manually or through crontab/at.Define following two line apart from other general ones in your script.
========================================
TIMESTAMP=$(date +%m%d.%I%M)
tar -cvf /tmp/tararchive.TIMESTAMP /tmp/files
========================================
This will stamp time in all the files created but your syntax will be slightly different. But this I think is enough for you to start with.
HTH,
Devender
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2005 09:31 PM
08-21-2005 09:31 PM
Re: compress file
You can do archive as,
tar -cvf archive_$(date +'%d%b%y-%H:%M%p').tar /tmp/*
[[ $? -eq 0 ]] && echo "Tar execution is success @ $(date +'%d%b%y-%H:%M%p')"
hth.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2005 09:32 PM
08-21-2005 09:32 PM
Re: compress file
tar -cvf /tmp/archive_$(date +'%d%b%y-%H:%M%p').tar /tmp/*
[[ $? -eq 0 ]] && echo "Tar execution is success @ $(date +'%d%b%y-%H:%M%p')"
hth.