a big fat thank you to all who responded! (list of good samaritans follows)
the suggestions worked and now i know a little more about what is going on :)
*short version:
Q1) how can one erase a file with a name like: .\usr\spool\mail\username ??
A1)#rm .\\usr\\spool\\mail\\username
Q2) what causes these files to be generated in the first place and how can i
avoid their generation in the future??
A1) several suggestions:
-`pine mailer creates files of this name form as lock files.
it may be dying...'
-`maybe one of your Mailtools was compiled with a M$-DOS option,
that uses `\` instead of `/` as directory separator.'
-`it looks like someone has a .pinerc with MS-DOS style pathnames.
Pull up that user's .pinerc (or ask them to) and look those
filenames.'
-`do you have SoftPC installed'
-`I'd have a long chat with Mr. Username about how heshe created them.
These look like [gag] Windoze file names. This looks like somebody has
ported some [gag] windoze shareware, and compiled it incorrectly.
Spank them.' <-----(my personal favorite)
-`Well, username 'username' owns the file, ask him.'
*long version with original questions at the top and complete responses
following:
hello
2 main questions:
i have found two files that i cannot seem to erase, even as root. they are
located in /usr/var/tmp and their long listing looks something like this:
1 -rw-rw-rw- 1 username 4 Oct 16 11:18 .\usr\spool\mail\username
1 -rw-rw-rw- 1 username 4 Oct 16 20:12 .\usr\a\username\mail\sent-mail
where username is the same for both.
1)How can i erase these files? (when #rm .\usr\spool\mail\username, i get a
message like:
rm: .usrspoolmailusername nonexistent)
2)How might i go about finding out what caused them and how to avoid it in the
future?
*responses:
1. Richard_Brittain <richard_at_sapphire.dartmouth.edu>
The \ is a special character to the shell. Use \\ to get a single effect \
rm .\\usr\\spool\\mail\\username
or put the whole thing in single quotes.
The pine mailer creates files of this name form as lock files. If they
are left lying around, pine must be dying for some reason.
2. nelson_at_bv.com (Steve Nelson)
easy one - rm .\\usr\\spool\\mail\\username (hise the \ with another \)
also easy - keep all the pc users away from your system
3. alan_at_nabeth.cxo.dec.com
Your first problem is that UNIX files names are separated by
the forward slash character (/) not the back-slash character
(\) as used by MicroSoft. The two are quite different. In
fact UNIX systems typically use \ as an escape character to
coerce the shell not to interpret the next character in any
particular way.
Your next problem is that /usr/spool/mail/username is the
file used to store a user's incoming mail. Depending on
the particular mail reader they use, it may also be the
place where all that user's mail is kept. Your users will
not appreciate having their mail removed. You would be
wise to find out what a file is, before you try to remove
it.
The hier manual page may be very informative for what files
are in different directories across the system.
4. Sylvain Robitaille <syl_at_alcor.concordia.ca>
You need to escape the backslashes, because a backslash is a special
character which usually means (to the shell) "take the next character
literally." This should work:
# rm .\\usr\\spool\\mail\\username
The only cause I can think of is that someone at some point in time
tried to make files using MS-DOS path conventions. In MS-DOS the
backslash is the path separator, while in Unix it's the forward slash.
Many users new to Unix, but familiar to DOS don't know this and try to
form paths the wrong way.
5. "D. J. Vanecek" <djv_at_bedford.net>
try rm .\\usr\\a\\username\\mail\\sent-mail
or try rm *username* but be careful with that. "ls something" will expand
the same as "rm something" so look at "ls something" first.
I'd have a long chat with Mr. Username about how heshe created them
These look like [gag] Windoze file names. This looks like somebody
has ported some [gag] windoze shareware, and compiled it incorrectly.
Spank them.
6. Pirie Hart <pirie_at_u.washington.edu>
Try typing two (2) backslashes (\\) where one appears. The backslash
character is magically, in that it escapes the meaning of other
characters (such as *). Using two backslashes is interpreted to mean one
REAL backslash.
rm .\\usr\\spool\\mail\\username .\\usr\\a\\username\\mail\\sent-mail
should do the trick. If not, try
rm -i *username*
The -i flag means to ask you before deleting each file.
7. harald hl_at_tekla.fi
rm \\usr\\spool\\ ....
Can't say for sure, but I'd guess it's some pc-like software, where /
has been replaced
with \. Do you have SoftPC installed
8. Trevor Schroeder <tschroed_at_cheetah.wsc.edu>
You want to do rm .\\usr\\spool\\mail\\username
Remember, the \ is the escape character, so rm .\usr\spool\mail\username is
telling it to treat the u in usr, the s in spool, m in mail, and u in
username as literal characters. You need to use \\ to tell it to treat the \
as a literal character.
It looks like someone has a .pinerc with MS-DOS style pathnames. Pull up
that user's .pinerc (or ask them to) and look those filenames.
9. "Dave FitzPatrick" <fitzpatrick_at_quantic.com>
Since the backslash "\" is a special character used to tell the shell not
to interpret the special character that follows, but take it literally, try
doubling them up:
#rm .\\usr\\spool\\mail\\username
10.Isaac Kohen <koheni_at_voyager.bxscience.edu>
rm -rf ./.\\usr\\a\\username\\mail\\sent-mail
if that doesnt work, fire up bash and use * or a tab.
Well, username 'username' owns the file, ask him.
11."Andrew A. Paine" <Andy_Paine_at_Earthling.net>
if you truly typed the "rm" command as:
rm .\usr\spool\mail\username
then just turn the "slashes" around ("\" is for the PC)
rm ./usr/spool/mail/username
hope this is the correct soultion.
12.Ruediger Peusquens <rp_at_ikp.Uni-Koeln.DE>
your
# rm .\usr\spool\mail\username
command does not work because \ is interpreted by your shell as an escape
character to alter the meaning of the following character. Since u, s and m
have no special meaning, the \ is simply skipped. (\ is useful to escape
things like '(){};' or newline.)
If you really mean \ use \\ since this will be interpreted as the literal \.
To remove these weird files, you could either use
# rm .\\usr\\spool\\mail\\username
or just quote the argument
# rm "\usr\spool\mail\username"
That should do it.
The filenames look like a complete M$-DOS file path. Maybe one of your
Mailtools was compiled with a M$-DOS option, that uses `\` instead of `/` as
directory separator.
13.Steve Wright (Sys Adm) <wright_at_cs.sc.edu>
The shell uses the "\" as an escape character. It "quotes" the
following one character. Try:
rm .\\usr\\spool\\mail\\username
thanks again
josie
*******************************************************************
Josie Young young_at_nuc006.psc.sc.edu
Unix Sys Admin (803) 777 5753
Nuclear Grp
Dept Physics & Astronomy
Univ of SCarolina
Received on Thu Oct 23 1997 - 21:51:30 NZDT