Web Hosting Talk







View Full Version : Clearing /usr partition...


Cael
12-01-2001, 09:08 AM
I would like to know, which folder in my /usr partition are free to clear without doubting? Or is there any folder which I can move out the partition and create a symbolic link for it else where?

Thank you. :)

Craig
12-01-2001, 09:29 AM
You can clear out logs from /usr/local/apache/domlogs
And also /usr/local/apache/logs

Though, don't remove any of the logs, just do echo -n > filename, to clear them.

C.

The Prohacker
12-01-2001, 09:30 AM
I'm guessing your running Cpanel. You could move your
/usr/local/apache/domlogs/ To /home/domlogs/

And symlink it up...
I was running into /usr running out of space and that fixed it...

bobcares
12-01-2001, 10:39 AM
HI!
The rule is clear disk space.
You can easily move some directories to other partitions that are free and the create soft links for it.
It would do no harm ...
On a default BSD box the /home is a system link and the actual /home is the /usr/home/


Have a great day :-)

Regards
amar

Cael
12-01-2001, 11:50 AM
Thanks.

By moving domlogs and logs in /usr , many space has been cleared. Thank you guys. :)

universal2001
12-02-2001, 11:25 AM
Hi The Prohacker

Can you show me step by step on how to set this up..
e.g. how to use symlink, etc..


My /usr folder is currently 90% full.. *From Apache log files in /domlogs)

I am running CPANEL...

Thanks!

hoachen
11-03-2005, 08:27 AM
where can I find out where is sendmail? I put it as /usr/sbin/sendmail but when I test it I got an error said " /usr/sbin/sendmail: Bad file descriptor ". Or I have to check with my hosting company? Can anybody sport anything wrong of my code?

here is my code

#!/usr/bin/perl -w
print "Content-type: text/html\n\n";
print "thank you !\n";

$sendmail = '/usr/sbin/sendmail'; # where is sendmail?
$recipient = "hoachen\@hotmail.com"; # who gets the form data?

print "\n\nwhat is this $sendmailfor sendmail\n\n";

print "\n\nthis is a $recipient for recipient\n\n";


use CGI;
$query = new CGI;



$mail_body = '';

foreach $field (sort ($query->param)) {
foreach $value ($query->param($field)) {
$mail_body .= "$field: $value\n";
}
}



if ($email = $query->param('07_email')) {

if ($name = $query->param('01_name')) {

$name =~ s/"//g; # lose any double-quotes in name
$sender = "\"$name\" <$email>";
} else {

$sender = "$email";
}
}



open(MAIL, "|$sendmail -oi -t") or die "Can't open pipe to $sendmail: $!\n";
print MAIL "To: $recipient\n";
print MAIL "From: $sender\n";
print MAIL "Subject: Sample Web Form Submission\n\n";
print MAIL "$mail_body";
close(MAIL) or die "Can't close pipe to $sendmail: $!\n";