- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: compressing all the small files
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
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
тАО11-26-2009 09:22 AM
тАО11-26-2009 09:22 AM
/tmp getting full due to many small files, so is there any way to compress all the files into one archive and then again compress by gzip
Could any body help me out on this...
Thanks in advance
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-26-2009 09:30 AM
тАО11-26-2009 09:30 AM
SolutionI don't have a system to test but I think
You could try something start by
find /tmp -size < size of small files >| tar cvf backup_smallfile.tar
or
find /tmp -size < size of small files >| xargs tar cvf backup_smallfile.tar | gzip -c > backup.tar.gz
HTH
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-26-2009 09:33 AM
тАО11-26-2009 09:33 AM
Re: compressing all the small files
Yep, that's how I'd do it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-26-2009 09:36 AM
тАО11-26-2009 09:36 AM
Re: compressing all the small files
The '/tmp' filesystem is intended for use by the operating system. Generally, the files placed within are small lock files and socket files. '/var/tmp' is the proper repository for application temporary files.
How many is "many"? How "small" is small? How old are the files and what are they?
You can configure your server to remove the contents of the '/tmp' directory at startup. It sounds like you need to do some cleanup.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-26-2009 09:41 AM
тАО11-26-2009 09:41 AM
Re: compressing all the small files
i just really confused how to compress all these files into one archive
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-26-2009 09:47 AM
тАО11-26-2009 09:47 AM
Re: compressing all the small files
find /tmp -size 1024 | tar cvf backup_smallfile.tar
Attempt to create archive of no files. Nothing dumped.
please let me know on this
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-26-2009 10:11 AM
тАО11-26-2009 10:11 AM
Re: compressing all the small files
find /tmp -type f -size -1024c |
(for file smaller than 1024 char)
Regards
Jean-Luc
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-26-2009 10:32 AM
тАО11-26-2009 10:32 AM
Re: compressing all the small files
while i am trying this command also ,, it shows the error
find /tmp -type f -size -1024c | tar cvf backup_smallfile.tar
Attempt to create archive of no files. Nothing dumped.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-26-2009 10:59 AM
тАО11-26-2009 10:59 AM
Re: compressing all the small files
find /tmp -type f -size -1024c | xargs tar cvf backup_smallfile.tar
Regards
Jean-Luc
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-26-2009 12:42 PM
тАО11-26-2009 12:42 PM
Re: compressing all the small files
>Attempt to create archive of no files. Nothing dumped.
As I say below, you can't use HP-UX's tar.
>smatador: find /tmp -size
You are not going to be able to use tar with find. The correct tools are pax(1), cpio(1) or GNU tar.
find /tmp -size -10000 | pax -w | gzip > backup.tar.gz
>Jean-Luc: find /tmp -type f -size -1024c | xargs tar cvf backup_smallfile.tar
Again, you need to give up on tar.