No Escape (Jack)
In case you haven’t figured it out from my poetic style of writing, I am a computer programmer. I do most of my programming in a SCO Unix environment, a target I seldom hesitate to shower with disdain and dirty looks.

Today I’ve been doing some system cleaning and, for some reason completely not unbeknownst to me (and I’ll never tell you why), I found a file called “-o” on my system. I determined to remove this malignantly named interloper.

I drew my trusty rm command and struck:

rm -o
rm: ERROR: Illegal option – o
Blocked! This file is a sneaky one, masquerading as a command option. I struck again with double quotes:
rm “-o”
rm: ERROR: Illegal option -- o
Foiled again! I tried to escape:
rm \-o
rm: ERROR: Illegal option -- o
Blast! No escape! I pulled from my “vast” repertoire:
mv -o prepare_to_be_deleted
mv: ERROR: Illegal option -- o
My efforts had become the shell prompt equivalent of beating my head against a wall. I was not going to be defeated by a UNIX file, especially not one with a puny annoying name. I needed a plan, a diversion, a way to catch this nuisance unprepared.

I opened up ftp and waited; waited for the file to stop watching me, to let its guard down. (This takes approximately 0.32 ms under SCO Unix.) I opened up an ftp connection…to my own system! Quickly, I typed and ended the line with a emphatic pinky on the Enter key.

del -o
Victory! Shouts of “DELE command successful” echoed throughout the system. I had freed them from their “-o”ppressor. All thanks to the help of ftp: File Termination Protocol.
Trackbacks
The trackback URL for this entry is:
http://king-of-fools.com/blog/trackback/1346/ZGSQ5FWI/
Comments

Not certain this will work in SCO Unix, but in most Unices I’ve worked with, a ‘--’ indicates to the program that everything to the right should be taken as a filename and not an option.  So “rm—-o” would have worked.  Also, you could have created a dummy file with a normal filename (say ‘foo’wink, then deleted the dummy file and your -o file with “rm foo -o”

Posted by: Michael Bates - 01:44 PM - 10/09

There are two obvious solutions for this kind of problem:

1. Unix wizard: rm ./-o

2. Mere mortal: start up Midnight Commander, Nautilus or some other graphical pointy-clicky file manager, select the file, delete it.

Posted by: Marius Gedminas - 09:18 AM - 10/12

’scosh’ would qualify under solution #2.  What a wretched piece of interface but handy for deleting things more difficult to grab with the command line.

Of course, no one else has pointed out that ‘rm *’ would definitely take care of the offending file with ease.

Posted by: King of Fools - 10:58 AM - 10/12

I use Exceed with all of its connections, either in ftp or telnet or whatever.  The ftp works well. 

I think I have done something similar using rm with -i to give the interactive prompt option.

Posted by: - 09:48 AM - 10/14
Post Your Comment
Commenting is not available in this weblog entry.
Categories
Archives
September 2010
S M T W T F S
      1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30    

Complete Archives

Tools
Search:
  Advanced Search

Mailing List:



Currently Reading
Recently Read
Animal Farm

Animal Farm
George Orwell

Life of Pi

Life of Pi
Yann Martel

The Fourth K

The Fourth K
Mario Puzo

Catch 22

Catch 22
Joseph Heller

the Sicilian

the Sicilian
Mario Puzo

The Quantum Rose

The Quantum Rose
Catherine Asaro

Members
Sponsors
Blogroll
Links
Stats
Entries: 2147
Comments: 2925
Trackbacks: 665
Members: 258

Most Recent:
  Entry: 11/09/08 9:38
  Comment: 11/17/08 12:27
  Visitor: 09/02/10 12:44

Powered by:
  ExpressionEngine

Extreme Tracking