- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: uncompress default
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
06-17-2002 08:45 AM
06-17-2002 08:45 AM
uncompress default
We are running "uncompress
My question is, are there any parameters that we could use for uncompress not to prompt in case same file found and instead automatically "DONT" override existing files? or are there any scripts to use uncompress by defaulting the prompt to "N" if file exists?
THanks
Joey
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-17-2002 08:49 AM
06-17-2002 08:49 AM
Re: uncompress default
1) remove the orginal file it is being uncompressed into first, before uncompress.
2) the "-f" option on uncompress will force it to overwrite the file.
-- Rod Hills
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-17-2002 08:51 AM
06-17-2002 08:51 AM
Re: uncompress default
Best thing to do is in the script do an "if" statement to test before uncompressing.
if [ ! -e yourfile ] ; then
uncompress yourfile.Z
fi
-- Rod Hills
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-17-2002 08:53 AM
06-17-2002 08:53 AM
Re: uncompress default
You can check if the file exist first, somthing like that:
if [ -f filename ]
then
echo "the file allready exists then not overrider"
else
uncompress filename
fi
Hope this helps,
Justo.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-17-2002 09:06 AM
06-17-2002 09:06 AM
Re: uncompress default
use -f option .
ie uncompress -f
All the best
Manoj Srivastava
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-17-2002 09:07 AM
06-17-2002 09:07 AM
Re: uncompress default
if we have to many files to test and we dont want to do several loops within the script just to test the file if existing or not?
Can we let uncompress program to do these test and just default it not to override existing files?
Thanks again
Joey
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-17-2002 09:09 AM
06-17-2002 09:09 AM
Re: uncompress default
Marty
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-17-2002 09:10 AM
06-17-2002 09:10 AM
Re: uncompress default
NO
The man page for uncompress gives no indication that this is available.
I assume you are doing something like a uncompress *.Z and only new files to be uncompressed. A shell script really would not be that ineffecient.
-- Rod Hills
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-17-2002 09:12 AM
06-17-2002 09:12 AM
Re: uncompress default
No there is not a parameter into uncompress.
See man page.
Regards,
Justo.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-17-2002 09:16 AM
06-17-2002 09:16 AM
Re: uncompress default
uncompress *.Z &0
With STDERR set to null, uncompress can't do a prompt, so it defaults to no.
-- Rod Hills
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-17-2002 09:18 AM
06-17-2002 09:18 AM
Re: uncompress default
I think there is no option , the better way would be to move it to some toher direcotry and then uncompress it.
Manoj Srivastava
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-17-2002 09:21 AM
06-17-2002 09:21 AM
Re: uncompress default
If you want multiple behaviors, then you are going to have to write a script to test if the file exists or not.
live free or die
harry
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-17-2002 09:25 AM
06-17-2002 09:25 AM
Re: uncompress default
I don't forsee any problems with my solution, but then again you are trying to do something a little "non-standard".
my 2 cents
-- Rod Hills
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-17-2002 09:34 AM
06-17-2002 09:34 AM
Re: uncompress default
Again thanks
Joey