[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [cobalt-users] How do I clear a users e-mail out?
- Subject: RE: [cobalt-users] How do I clear a users e-mail out?
- From: "Oliver Hasprich" <Oliver.Hasprich@xxxxxx>
- Date: Thu Mar 16 03:44:19 2000
> > shell# > /var/spool/mail/user
> >
> > This takes an input value of nothing and over writes the file
> > with it. Very quick and simple way of getting rid of mail.
>
> Yup, that'll deal with that user's email, that's for sure.
> This is what happens (listing of part of mailspool):
>
> -rw-rw---- 1 johndoe mail 492065 Nov 16 10:44 johndoe
> -rw-r--r-- 1 root root 0 Mar 16 11:36 user
>
> Slight ownership / permissions problem.
Not at all. If you overwrite an existing file, UNIX/LINUX will
keep the file?s ownership and permission settings and will only
replace its contents. This problem only occurs if you create a
completely new file (as you did here). In this case, the new
file is created with the current user?s user/group and umask
settings.
Example: Having
-rw-rw---- 1 johndoe mail 492065 Nov 16 10:44 johndoe
in your directory and executing > /var/spool/mail/user as root
will result in the new file
-rw-rw---- 1 johndoe mail 492065 Nov 16 10:44 johndoe
-rw-r--r-- 1 root root 0 Mar 16 11:36 user
But executing > /var/spool/mail/johndoe will lead you to
-rw-rw---- 1 johndoe mail 0 Mar 16 11:36 johndoe
Best regards,
Oliver Hasprich