- Community Home
- >
- Servers and Operating Systems
- >
- Operating System - HP-UX
- >
- System Administration
- >
- compressing all the small files
-
- Forums
-
Blogs
- Alliances
- Around the Storage Block
- Behind the scenes @ Labs
- HPE Careers
- HPE Storage Tech Insiders
- Infrastructure Insights
- Inspiring Progress
- Internet of Things (IoT)
- My Learning Certification
- OEM Solutions
- Servers: The Right Compute
- Shifting to Software-Defined
- Telecom IQ
- Transforming IT
- Infrastructure Solutions German
- L’Avenir de l’IT
- IT e Trasformazione Digitale
- Enterprise Topics
- ИТ для нового стиля бизнеса
- Blogs
-
Quick Links
- Community
- Getting Started
- FAQ
- Ranking Overview
- Rules of Participation
- Contact
- Email us
- Tell us what you think
- Information Libraries
- Integrated Systems
- Networking
- Servers
- Storage
- Other HPE Sites
- Support Center
- Enterprise.nxt
- Marketplace
- Aruba Airheads Community
-
Forums
-
Blogs
-
InformationEnglish
- 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
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- 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
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- 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
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- 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
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- 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
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- 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
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- 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
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- 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
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- 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
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- 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
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- 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.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
11-26-2009 03:30 PM
11-26-2009 03:30 PM
Re: compressing all the small files
http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1362972
Hewlett Packard Enterprise International
- Communities
- HPE Blogs and Forum
© Copyright 2019 Hewlett Packard Enterprise Development LP