- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: find and compress
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-04-2001 11:48 AM
05-04-2001 11:48 AM
find and compress
If I do find . -type f -exec compress -f {} \;
It will not work consistantly.
Here are the number of files compressed in 7 runs:
265, 784, 264, 519, 264, 264, 980.
Is there something about find and compress that do not go together?
This was uncovered when I was compressing files in a laarge file system.
If I use compress * in the current directory it compresses all the files.
If I go to the higher level directory (test) and use find test -type f ... It also does not compress all the files.
As a side note. Every once and a while compress will tell me that some of the files are already compressed.
DO my problems come about because the find command uses the directory list which compress updates because the inode of the compressed files would be different that the uncompressed?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-04-2001 12:46 PM
05-04-2001 12:46 PM
Re: find and compress
compressdir -f .
If you are running compress multiple times on the same directory, I think you might not get what you expect.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-04-2001 12:56 PM
05-04-2001 12:56 PM
Re: find and compress
I did not know about compressdir when I was doing the find.
I have tried compressdir -f abd it also does not work.
I was not trying to do multile compress at the same time on the same directory.
Tx eric
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-04-2001 02:34 PM
05-04-2001 02:34 PM
Re: find and compress
find . -print >/tmp/myfiles
cat /tmp/myfiles | xargs -n1 compress -f
Maybe when the directory is large, find gets lost walking the directory when compress puts the compressed files back into the same directory.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-07-2001 08:54 AM
05-07-2001 08:54 AM
Re: find and compress
find . -type f ! -name "*.Z" -exec compress {} \;
Next, compress will not
compress files for which
there is no advantage (i.e.,
the compressed version won't
actually be smaller). You can
override this with -f, or
find . -type f ! -name '*.Z" -exec compress -f {} \;
As for using xargs, that's
usually OK, but breaks down
when files have newline char's
in their names (admitedly rare).