/usr/share/THE/rm.the is in the 3.3~rc1-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 | /*
$Id: rm.the,v 1.2 2008/02/29 00:48:42 mark Exp $
*/
/***********************************************************************/
/* Description: REXX macro to delete a file from a DIR.DIR file. */
/* Syntax: */
/* Notes: This macro deletes the line from the DIR.DIR file and */
/* the actual file from disk. */
/* Use with caution. */
/***********************************************************************/
Trace o
'EXTRACT /TOF/EOF/VERSION/DIRFILEID/CURLINE/' /* get various stuff */
If rc \= 0 Then
Do
Say 'Error in EXTRACT:' rc
Exit 1
End
If \dir() Then
Do
'emsg ERROR: rm.the can only be run from the DIR.DIR file'
Exit 1
End
If \modifiable() Then
Do
'emsg ERROR: invalid cursor position'
Exit 1
End
If version.2 = '1.5' Then oncommand = command()
Else oncommand = incommand()
If oncommand Then
Do
If tof.1 = 'ON' | eof.1 = 'ON' Then
Do
'emsg ERROR: cannot delete TOF or EOF line'
Exit 1
End
End
Select
When (version.3 = 'UNIX' | version.3 = 'X11') & Substr(curline.3,1,1) = 'd' Then
Do
'emsg ERROR: cannot delete directories'
Exit 1
End
When version.3 = 'DOS' & Substr(curline.3,6,3) = 'dir' Then
Do
'emsg ERROR: cannot delete directories'
Exit 1
End
When version.3 = 'OS2' & Substr(curline.3,6,3) = 'dir' Then
Do
'emsg ERROR: cannot delete directories'
Exit 1
End
Otherwise Nop
End
If version.3 = 'UNIX' | version.3 = 'X11' Then delcmd = 'osq rm -f'
Else delcmd = 'osq del'
'sos delline'
filename = dirfileid.1||dirfileid.2
delcmd '"'filename'"'
'msg File' filename 'deleted'
Return 0
|