|
|
| Author |
Message |
chelsea
|
|
Indestructable File
|
Nov 30 21:16 UTC 1993 |
Ok, you're not allowed to ask why I did it but I created two
files, one named <twit and the other >twit. When I try to
delete them or rename them I'm greeted with, "No such file or
directory". Bummer. How do I get rid of them?
|
| 35 responses total. |
scg
|
|
response 1 of 35:
|
Nov 30 21:58 UTC 1993 |
Would it be possible to move the other files in the directory somewhere
else and then delete the whole directory? I haven't tried this, but it
might work. An other thing that occurred to me is to put the filenames in
quotes. If that works it would be much simpler.
|
rcurl
|
|
response 2 of 35:
|
Dec 1 00:07 UTC 1993 |
(She's dividing us into those lower than a twit, and higher than a twit.)
|
davel
|
|
response 3 of 35:
|
Dec 1 01:52 UTC 1993 |
This probably won't work, since you'll have tried it already, but I'd expect
one of the following two methods to do it:
rm ?twit
rm -i * (and then don't confirm anything but the ones you want).
There's probably something simple I'm overlooking.
|
davel
|
|
response 4 of 35:
|
Dec 1 02:01 UTC 1993 |
Well, I tested creating & removing files with those names, & had no trouble.
Both rm ?twit and Steve's suggestion of rm '>twit' '<twit'
seemed to work fine. (Note: I use sh; if you're using csh or something else
& these methods don't work, try running sh & issuing such commands there.)
Obviously, rm <twit won't work, since that's trying to run rm with
input from the nonexistent file twit. I suspect that's what you tried, but
I don't know.
|
chelsea
|
|
response 5 of 35:
|
Dec 1 14:35 UTC 1993 |
They are gone. I used the "rm ?twit" command and it worked
just fine. Thanks for the help.
I guess I should count my blessings I didn't name that file
what originally sprang to mind. This is a family system and all. ;-)
|
davel
|
|
response 6 of 35:
|
Dec 1 16:11 UTC 1993 |
It is often quite easy to create files with special characters in them via
programs that open files (since it's the shells that interpret characters
such as * and ? and > and <). And even with the shell it's all too easy to
create files containing such characters in their names:
$ >test?
$ ls -l test?
-rw-r--r-- 1 davel 0 Dec 1 11:05 test?
$ >test*
$ ls -l test?
-rw-r--r-- 1 davel 0 Dec 1 11:06 test*
-rw-r--r-- 1 davel 0 Dec 1 11:05 test?
$ rm -i test?
rm: remove test*? y
rm: remove test?? y
$
Note that in the first line the ? is interpreted as just another filename
character; everywhere else that I typed it, it's interpreted by sh as a
template character and matched.
|
popcorn
|
|
response 7 of 35:
|
Dec 8 02:02 UTC 1993 |
This response has been erased.
|
vidar
|
|
response 8 of 35:
|
Dec 21 02:29 UTC 1993 |
Speaking of indestructible files, I acidentially saved a game as !saved on
/u/vidar and have not been able to get rid of it.
|
popcorn
|
|
response 9 of 35:
|
Dec 21 02:38 UTC 1993 |
This response has been erased.
|
kaplan
|
|
response 10 of 35:
|
Dec 23 14:46 UTC 1993 |
I'm no UNIX wizard, but wouldn't the backslash character be useful in these
situations?
|
remmers
|
|
response 11 of 35:
|
Dec 23 19:13 UTC 1993 |
It often is -- to the shell, the backslash quotes the immediately
following character. So
rm \>twit
would probably work.
Consider this question though: Suppose that somehow you managed to
create a file named "-i". How would you delete it?
|
mju
|
|
response 12 of 35:
|
Dec 23 21:53 UTC 1993 |
(If you know the answer, should you say?)
|
kentn
|
|
response 13 of 35:
|
Dec 23 23:59 UTC 1993 |
rm ./-i works just fine
|
popcorn
|
|
response 14 of 35:
|
Dec 24 15:15 UTC 1993 |
This response has been erased.
|
vidar
|
|
response 15 of 35:
|
Dec 31 01:20 UTC 1993 |
<evil grin>
|
carson
|
|
response 16 of 35:
|
Jan 19 06:48 UTC 1994 |
How? How?
|
vidar
|
|
response 17 of 35:
|
Jan 28 03:04 UTC 1994 |
By manipulating my mouth, stupid.
|
carson
|
|
response 18 of 35:
|
Jan 28 14:05 UTC 1994 |
!twit vidar
how? how?
|
vidar
|
|
response 19 of 35:
|
Feb 16 01:40 UTC 1994 |
I thought this item was about Indestructabile files.
I cannot manage to destroy my registration in the Language conference.
every time I "rm .langl.cf" grex tells me that there is no such file
or directory! Help! I beseech thee...
|
gerund
|
|
response 20 of 35:
|
Feb 16 03:12 UTC 1994 |
hmm, but shouldn't it be a "rm .lang1.cf" and not "rm langl.cf"?
the difference being that its a 1 and not an l?
|
popcorn
|
|
response 21 of 35:
|
Feb 16 05:31 UTC 1994 |
This response has been erased.
|
carson
|
|
response 22 of 35:
|
Feb 16 17:20 UTC 1994 |
*RE: 11:*]
how? how?
|
davel
|
|
response 23 of 35:
|
Feb 17 01:09 UTC 1994 |
rm -i ./-i or rm -i -- -i should do it.
The form with -- works with programs conforming to current standards, which
excludes a *lot* of stuff, but worked with rm on grex last time I tried it.
The other one should work more widely. (Note that Kent *did* give it in
#13, Carson.)
|
carson
|
|
response 24 of 35:
|
Feb 17 22:33 UTC 1994 |
Mea culpa. I was confused by response 14 and the lack of responses afterwards.
I'll have to go try it out now!
|