- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Compress by date
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-23-2002 05:37 PM
05-23-2002 05:37 PM
I would like to compress all files older than 9 months.
Help please:)
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-23-2002 05:52 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-23-2002 05:54 PM
05-23-2002 05:54 PM
Re: Compress by date
find / -type f -mtime +279 -name '*.dat' -exec gzip {} \;
That will find all regular files (-type f) older than 279 days (-mtime +279) that end with '.dat' (-name '*.dat') and then call gzip on that file.
Regards
Steve
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-23-2002 05:56 PM
05-23-2002 05:56 PM
Re: Compress by date
yeah - sorry, you certainly don't want to do this from /
Steve
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-23-2002 05:58 PM
05-23-2002 05:58 PM
Re: Compress by date
Have attached a little word doc that I use for reminders
Steve
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-23-2002 06:12 PM
05-23-2002 06:12 PM
Re: Compress by date
# cd /tmp
# touch 200109010001 ref
==> Create an empty file called "ref" dated Sept 1, 2000.
2001=yr
09=month
01=day
00=hour
01=minute
# cd /data
# find . -newer /tmp/ref -exec gzip {} \;
==> Compress all files that are newer than the timestamp on file /tmp/ref.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-23-2002 06:15 PM
05-23-2002 06:15 PM
Re: Compress by date
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-23-2002 09:56 PM
05-23-2002 09:56 PM
Re: Compress by date
you can also use the command compress as well as gzip
find /myfilesystem -mtime +279 -exec compress {} \;
John.