- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Compressing multiple files using string of a d...
Categories
Company
Local Language
Forums
Discussions
Knowledge Base
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Forums
Discussions
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
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
12-11-2005 07:35 PM
12-11-2005 07:35 PM
I need to compress multiple files of a directory. All files started with the string msc... and ended with the alphabet p or z should have to be compressed. Can anybody help with this issue?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-11-2005 07:48 PM
12-11-2005 07:48 PM
Re: Compressing multiple files using string of a directory
Two solutions:
1) compress single files:
for i in msc*[pz]; do
compress $i
done
2)
create a compressed archive:
# tar cvf - msc*[pz] | compress >msc.tar.Z
# rm msc*[pz]
rgds
hgh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-11-2005 07:55 PM
12-11-2005 07:55 PM
Re: Compressing multiple files using string of a directory
go to the directory you want to compress and run the following commands:
tar -cvfp msc-pz.tar msc*[pz]
gzip -9 msc-pz.tar
Thats it
Br
Thummalu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-11-2005 08:12 PM
12-11-2005 08:12 PM
Re: Compressing multiple files using string of a directory
# gzip msc.tar
-Arun
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-11-2005 08:15 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-11-2005 11:35 PM
12-11-2005 11:35 PM