- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Compress and move in one step.
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
тАО03-08-2004 04:38 AM
тАО03-08-2004 04:38 AM
Compress and move in one step.
Sometimes manually I need to move some of Oracle archive log files to another directory on the fly due to lack of space.
I need a quick command to achieve this and may be cron it.
Thanks,
Gulam.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-08-2004 04:45 AM
тАО03-08-2004 04:45 AM
Re: Compress and move in one step.
/bin/compress a; /bin/mv a.Z /tmp/test
where /tmp/test is a directory.
Regards,
Dave.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-08-2004 04:46 AM
тАО03-08-2004 04:46 AM
Re: Compress and move in one step.
you can use
compress -c filetocompress > /path/to/dir/compressedfile
-c is output to stdout
greetings,
Michael
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-08-2004 04:50 AM
тАО03-08-2004 04:50 AM
Re: Compress and move in one step.
# compress < filetocompress > /path/filetocompress.Z
If you want a script:
for FILE in $(cat listoffilestocompress)
do
echo "Compressing ${FILE}"
compress < ${FILE} > /path/${FILE}.Z
done
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-08-2004 05:19 AM
тАО03-08-2004 05:19 AM
Re: Compress and move in one step.
But the posted answers jut show how to compress but not how to move and compress as well.
Gulam.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-08-2004 05:23 AM
тАО03-08-2004 05:23 AM
Re: Compress and move in one step.
can you tell us, what the difference is between out approach and your's is?
Both in one step isn't possible.
I let the compress output it's compressed stram on stdout and put it there, where it is supposed to be. Then you can rm the orignal. If you think, you can spare a temporary file during compression, I think that is not possible.
Michael
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-08-2004 05:44 AM
тАО03-08-2004 05:44 AM
Re: Compress and move in one step.
mv file /path/file && compress /path/file
Anil