Soln:

# rm ./ "-r*"
# rm -- "-r*"

Well some of you got it while and the others... PLEASE pkgrm that GUI and start 
hitting those books!

2 Methods
Given 2 files. -F and ---wow (YES they can be created!)

I. Hiding in the directory

rm "./file"

$ rm ./ -F
$ rm "./ ---wow"

By placing the  ./ (dot, slash) infront of the filename you hide the option and treat 
it as part of the file. The lines remove the file (not the option)  from the current 
directory. Whenever in doubt, quotation marks (" ") help define the file and should be 
used.

II. Fighting a Dash with a Dash

rm -- file

$ rm -- -F
$ rm -- ---wow

The double dash before the file will treat it as a file and not as an option. it 
treats what UNIX thinks is an option as a file.

Kiggundu Mukasa <[EMAIL PROTECTED]> wrote:

>Hell NO!!!!, but that is a good one :=)
>
>On Wed, 2003-09-17 at 21:50, [EMAIL PROTECTED] wrote:
>
>> You only have 5 seconds to answer this one...
>> 
>> On using ls -l if you find a file called -r* at the root level of the directory 
>> tree how would you remove it?
>> 
>> -rw------- � �1 root � � root � � � � 5910 Sep 18 00:00 -r*
>> 
>> Note
>> You have no GUI installed.
>> 
>> __________________________________________________________________
>> McAfee VirusScan Online from the Netscape Network.
>> Comprehensive protection for your entire computer. Get your free trial today!
>> http://channels.netscape.com/ns/computing/mcafee/index.jsp?promo=393397
>> 
>> Get AOL Instant Messenger 5.1 free of charge. �Download Now!
>> http://aim.aol.com/aimnew/Aim/register.adp?promo=380455
>> 
>> 
>> ---------------------------------------------
>> This service is hosted on the Infocom network
>> http://www.infocom.co.ug
>
>-- 
>**************** � � � � � � � � � � � � �*****************************
>Kiggundu Mukasa � � � � � � � � � � � � �# Computer Network Consultancy###
>KYM-NET LTD. � � � � � � � � � � � � � � # Intranets & Internet Solutions#
>Plot 80 Kanjokya Street
>P.O. Box 173 Kampala, Uganda � � � � � � 
>Tel: � � +256 77 972255
> � � � � +256 71 221141
>Fax: � � +256 31 262122
>*************************************************************************
>

__________________________________________________________________
McAfee VirusScan Online from the Netscape Network.
Comprehensive protection for your entire computer. Get your free trial today!
http://channels.netscape.com/ns/computing/mcafee/index.jsp?promo=393397

Get AOL Instant Messenger 5.1 free of charge.  Download Now!
http://aim.aol.com/aimnew/Aim/register.adp?promo=380455


---------------------------------------------
This service is hosted on the Infocom network
http://www.infocom.co.ug

Reply via email to