|
|
Help needed deleting my mail, new & old. Thanks.
27 responses total.
What mail are you using? elm? Pine? details I need details then, I might be able to help you.
I'm st using mail (nam
After mail displays the message, type "d" at the ? prompt.
Bill Long again. I still need help. I'm using PicoSpan, not Unix. I tried once with the "d" on fresh mail (first reading), but it still didn't delete. Maybe I should try it again on my next mail. But the big problem is old mail. I found some instruction somewhere on changing directory, and on mbox as a file of old mail, but I didn't get any results. Could someone throw me some instructions, without assuming I know a bunch of stuff about "mail" that I may not.
Bill, it might pay you a bit to switch to elm or pine. I have had elm for the past year and I absolutly love it. To use it, type elm at the next ok prompt. (make that !elm at the ok: prompt. Once you get into elm, you type o to set up your options like an editor, (I use vi although bbsed is a lot easier if you don't know anything about vi.). Then, when you get mail, merely type !elm at the OK: prompt and your mail will be listed piece by piece. Hitting <return> will display it, and once you`ve read it, you can delete it if you choose to, right on the spot. then, your worries about mail will be gone. (hopefully)
Bill, I agree on that, with one reservation: are you emulating (or using) something relatively sane & known to Grex, and do you specify it correctly in your login script (or at a prompt when you log in)? If not, don't use Pine or Elm. But if so, go to it. I use Elm all the time. My one comment is that with my terminal set to ansi-new or ansi I have problems with lines near 80 characters long - I've pretty much switched to vt100 because of this.
Thanks, folks, that should do it. I'll try elm.
Well, elm didn't work for me- said window size was too small. If i could maybe have some help in understanding the files listed by !ls: mail, mbox, dead.letter, and a couple mixed number & alpha names. None seem to be directories, correct me if i'm wrong. Can i delete one or more of the above to get rid of my mail. If i did so, would i have no file to receive mail into. What is the structure of the mail file...just one big file appended each time i receive mail- that doesn't make sense, but when i do !ls mail is ** it just gives me "mail" back...if it were a directory it would list the files in the directory.... Also, i read an info item early in my grex experience that mentioned mbox and change directories when i know nothing about unix and preceeding commands with !; now i can't find that item: does anyone know its header or item #? Thanks folks.
what is your Terminal type? One of the reasons that elm doesn't run is that your termcap isn`t set properly. Tis a prolem for root.
Bill, the "window size too small" message indicates that Elm doesn't think your TERM type has the capabilities to do the cursor movements etc. it wants to do. What type of terminal are you running (or emulating)? That file Mail is indeed a directory. But if you're saving mail with the mail program, it's probably going into mbox, which is indeed a single file. (By default, if you save mail with most anything it's going to just be appended to some one file somewhere.) There's an officially-sanctioned structure to these things: a line beginning "From " (note the blank!), other heading lines, an empty line, and lines containing a message up to the next "From " line. If you were to start a message line with "From " your mail program is supposed to add a ">" at the beginning to prevent it from messing up this structure. Those "cbf...." files are (I think) partially-entered responses left when either the system crashed or more likely your connection was terminated while you were entereing an item or response. Unless you want them for something go ahead and delete them. You can read them, or your mbox, with the commands cat or more, if you want to look at them directly. If you are using something more than a dumb terminal, & it's supported here, & you tell Grex what it is (correctly) when you log in, you can also read or edit these with an editor such as vi - and you could run elm and select mbox as your current folder & read/delete/ respond to those messages. You actually have a lot more files than you mentioned. By default, ls ignores files whose names begin with a period. Try ls -al The a option gives you those "hidden" files, and the l gives you more information - including a d flag at the begining of the line for any directories. (Most of those hidden files, in your home directory, track what you've read in the conferences you've joined.)
Thanks. I've been using VT100, but recently got Procomm, which will allow me to upgrade terminal types.
VT100 is fine; it's what I'm using. If you got that window-too-small error,
either you said some other TERM when you logged in (or let it give you
something else) or you garbaged something in your environment thereafter.
In fact, looking at your .profile, the relevant line says:
eval `/usr/ucb/tset -s -m 'dialup:?vt100 -m 'su:?vt100 "${TERM-dumb}"`
and I suspect that the thing about TERM-dumb is your problem. I confess
I've never bothered to figure out how that line works in detail, so I'm not
sure. Mine says:
eval `/usr/ucb/tset -s -m 'dialup:?vt100' -m 'su:?vt100' "${TERM-vt100}"`
and seems to work fine, so you might try that. I think you're probably
setting your TERM to dumb by default ...
try setenv TERM vt100 or TERM=vt100 export TERM
(That's for a one-time fix, or for your .profile if you don't want it asking you every time. But that may not get your TERMCAP set right.) (And the first form is if you use csh - the second if you use sh.)
I thought I had changed my term. from dumb to vt100 a month ago. When in went into !change to change my terminal type yesterday, it said that that section of change was down, to be resurrected in a couple days. Maybe it's been malfunctioning for a month, unnoticed.
I've also been trying to remove my old mail with the unix rm (delete file) command. I type !rm Mail/* and get the message "no file or directory named Mail/*." I've also tried !rm /Mail/*, same result. Any tips out there one unix pathnames/file structures?
I can't tell what is in your Mail directory (you're the only one with access to it). From a Unix shell prompt try ls -al Mail or ls -alR Mail in case you have subdirectories under there (which I doubt). One possibility is that your Mail directory contains files whose names begin with . (a period). rm will ignore those unless you specify them by a template beginning with a . In fact, it's quite likely. You could try rm -i Mail/* Mail/.* This will give you error messages saying that Mail/. and Mail/.. are directories; that's fine. If you get any *other* error messages they should be more helpful. (You'll probably get the one about no file named Mail/* again. I left that on there just in case something gets added in the meantime.)
There are at least two places where mail is kept, in the file named mbox in +your+ directory, and in the file named /usr/spool/mail/yourloginid. the mail command will use /usr/spool/... and once inside that process, from the & prompt, the command d x will d_elete the x'th numbered message. In fact, d x1 x2 x3 x4 will delete four messages at once. To identify which emails to delete, use the command h and each email will show up numbered, 1-n. There may be a way to specify a contiguous range of emails to delete, but it *can* be dangerous that way. Also, once you have read an email, which returns you to the & prompt, the command d without a number will d_elete +that+ particular email, and the email-pointer increments to the next higher numbered email. If you do nothing to the "current email," the mail process will append everything you have read onto the file mbox in your directory. Now that the mbox file is stuffed to the gills, you may wish to sort through that file. Two ways to do that (unix almost always provides more than two ways to do anything ... heh-heh). The easiest,. if you are familiar with the mail process, is to issue the command mail -f mbox and instead of using /usr/spool/... file, the switch and argument above will tell mail to use the -f_ile named mbox, and all is as described above, with one exception. mail will NOT move any messages anywhere else unless explicitly stated with a s_ave fylename command, so the normal pre command has no effect. That's enough babble for now, and may solve your situation in an incremental level. If you want to trash the entire mbox file without looking at it with either mail or an editor (the second way of editing mbox), you can use that famous rm command, as in rm mbox from any system prompt. Note, however that there is +*NO*+ recovery from rm !
One last note: If it all gets screwed up and you get as confused as possible (or maybe just a bit more) use the command x from the & prompt and mail will quit and pretend you were never there. That is the saving grace from real snafus.
Thankyouthankyou TS Taylor. i did !vi /usr/spool/mail/chi1taxi, that got me where i could read my unread mail, and typed (for the 2039 lines of mail) 2039dd, which deleted all lines in file, leaving 1 line 1 character. Then i quit, using :wq which writes the changes (deleting all lines) and quits the editor. One problem, while i was piling through my mail, j worked to cursor down, but k, which is supposed to cursor up, also cursored down. Oh Valerie. Thanks again, relief after two weeks.
Um, Bill, there are reasons not to do it quite that way. I hope you won't have problems, but: - The first line of your mailbox (if it's not *completely* empty) should always be a standard From line, or things may get confused. (If you want to empty it in some such way, go into sh (for some reason this doesn't work under csh) and issue the command >/usr/spool/mail/chi1taxi which overwrites the file with nothing at all. - Things also could get messed up if you and something else (the mail daemon, most likely) wind up trying to update the file at the same time. But glad you got in there and got to it!
This response has been erased.
re #21: If you want to empty a file in csh, "cat > path/filename" followed by ^D will do it.
Or, you can do ":>filename". The ":" is necessary because csh doesn't interpret just ">" as a null command.
(Note that ":>filename" works in the Bourne shell, too.)
Since this is Unix, add this one to your bag of tricks, and I suspect that the shell will have +nothing+ to do with this one cp /dev/null /path/fylename don't have to worry 'bout extraneous characters, or line noise, or noffin-else!
Btw, chi1taxi, you are certainly welcome - - no problem.
Response not possible - You must register and login before posting.
|
|
- Backtalk version 1.3.30 - Copyright 1996-2006, Jan Wolter and Steve Weiss