• Welcome to Valhalla Legends Archive.
 

Odd command listed on documentation

Started by iago, January 19, 2004, 01:39 PM

Previous topic - Next topic

iago

I'm not completely sure what would happen if I typed this, and I don't want to try, but the documentation says to type this:
QuoteThe uninstall application relies on the files in the installDir /setup directory that was created at installation. If these file are deleted or modified, the application will be unable to remove the software. In that case you may delete the software manually. Move any customized files you wish to keep to a different location, then type the following command as root:

# rm -Rf installDir /*

Now, correct me if I'm wrong, but doesn't rm take a list as parameters, and wouldn't removing -Rf /* be a baad idea?  
This'll make an interesting test for broken AV:
QuoteX5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*


Adron

Quote from: iago on January 19, 2004, 01:39 PM
I'm not completely sure what would happen if I typed this, and I don't want to try, but the documentation says to type this:
QuoteThe uninstall application relies on the files in the installDir /setup directory that was created at installation. If these file are deleted or modified, the application will be unable to remove the software. In that case you may delete the software manually. Move any customized files you wish to keep to a different location, then type the following command as root:

# rm -Rf installDir /*

Now, correct me if I'm wrong, but doesn't rm take a list as parameters, and wouldn't removing -Rf /* be a baad idea?  

Sounds like a really bad idea yes. Would work much better without that space, or completely without the /*.

Kp

I think they made a mistake in those instructions. :P  Perhaps what they intended was to cd into the application's base directory, then rm -rf *  (no slash).  Although, if you want to be properly thorough, I'd suggest instead standing one layer above it and doing rm -rf Appdir -- the difference being that shell expansions by default do not catch .files, and rm'ing .* would match .., which would let it go up a layer, which would be bad. :p
[19:20:23] (BotNet) <[vL]Kp> Any idiot can make a bot with CSB, and many do!

iago

#3
Quote from: Kp on January 19, 2004, 02:15 PM
I think they made a mistake in those instructions. :P  Perhaps what they intended was to cd into the application's base directory, then rm -rf *  (no slash).  Although, if you want to be properly thorough, I'd suggest instead standing one layer above it and doing rm -rf Appdir -- the difference being that shell expansions by default do not catch .files, and rm'ing .* would match .., which would let it go up a layer, which would be bad. :p

I thought that at first too, but in the installation section they did the exact same thing to remove temporary files:
QuoteAfter the installation of the software is complete, you no longer need the contents of the temporary directory. Use the following command to remove it and all files it contains: $ rm -Rf tempDir /*

however, when I was searching for that, I dicovered that the updated version of that documentation lists it without the space, so it became:
$ rm -Rf tempDir/*
$ rm -Rf installDir/*
which wouldn't be as bad.  I wonder how many people removed their root before they made the change?

<edit> here's the page, in case you care:
http://docs.sun.com/source/816-5615-10/install.htm
This'll make an interesting test for broken AV:
QuoteX5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*


Kp

Interesting.  Their solution is still wrong though, even when amended not to put a space there.  See my remarks on shell expansion in my prior post for why my way is superior to even their amended version. :P
[19:20:23] (BotNet) <[vL]Kp> Any idiot can make a bot with CSB, and many do!

Banana fanna fo fanna

iPlanet has been suceeded by Sun ONE i think.

iago

Quote from: St0rm.iD on January 19, 2004, 06:16 PM
iPlanet has been suceeded by Sun ONE i think.

Yeah, Sun ONE bought them out.  But some stuff is still called iPlanet because they were too lazy to change the name, which really confuses things.  
This'll make an interesting test for broken AV:
QuoteX5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*


cipher

That is hilarious... if the developers wrote that doc, I sure wouldn't want to install their stuff...