≡ Menu

usr bin

HowTo: Run Firefox From The Command Line

How do I run Firefox browser from the Linux command line (shell prompt)? How to run Firefox from command line on Linux based server?
[click to continue…]

Linux / UNIX: Kill User Session

How do I kill all users session under Linux or UNIX operating system using command prompt?
[click to continue…]

Linux / UNIX: Run Commands When You Log Out

I've written a Perl script that connects to our central server for me and it allows me feed data so that I make a timesheet later. How do I run my script when I log out from Apple OS X or Linux / UNIX workstation using bash shell?
[click to continue…]

UNIX / Linux: Explains setuid File Permission

What does it mean for a file to be "setuid?" How do keep track of all setuid enabled file?
[click to continue…]

HowTo: Display / Echo Path Settings In Linux / UNIX / *BSD

How do I display my current path settings under Linux / FreeBSD / OpenBSD / NetBSD / Apple OS X / UNIX like operating systems using bash or ksh or csh / tcsh shell?
[click to continue…]

Freebsd makeinfo: not found Error and Solution

Q. I'm trying to build PHP5 under FreeBSD jail and I'm getting an error that read as follows:

m4.info-[0-9][0-9] ./m4.i[0-9] ./m4.i[0-9][0-9]; do if test -f $f; then mv $f $backupdir; restore=mv; else :; fi; done; else :; fi && cd "$am__cwd"; if makeinfo --no-split -I . -o ./m4.info ./m4.texinfo; then rc=0; cd .; else rc=$?; cd . && $restore $backupdir/* `echo "././m4.info" | sed 's|[^/]*$||'`; fi; rm -rf $backupdir; exit $rc
makeinfo: not found
*** Error code 127

Stop in /usr/ports/devel/m4.
*** Error code 1

Stop in /usr/ports/devel/autoconf262.
*** Error code 1

Stop in /usr/ports/lang/php5.
*** Error code 1

How do I get rid of this problem and compile applications?
[click to continue…]

make buildworld cd: can’t cd to /usr/src/tools/build/make_check Error and Solution

'm trying buildworld under FreeBSD operating system. But I'm getting an error which read as follows:

>>> Building an up-to-date make(1)
cd: can't cd to /usr/src/usr.bin/make
*** Error code 2

Stop in /usr/src.
*** Error code 1

Stop in /usr/src.

How do I fix this problem?
[click to continue…]

How do I send html email from Perl?

Q. How Can I send html email from cgi perl program under UNIX / Linux and Apache web sever?

A. Sending HTML email is an easy task with MIME::Lite CPAN module. It is a low-calorie MIME generator.

It can be use to send html emails, graphics file email attachments as a single-part or multi-part message. Here is simple perl script that sends html email.

Install Perl MIME::Lite

If you do not have MIME::Lite module, install using following command (login as a root user):

# cpan -i MIME::Lite

Perl script code

Script to send html email from perl:

#!/usr/bin/perl -w use strict; use MIME::Lite; # SendTo email id my $email = 'user@somewhere.com'; # create a new MIME Lite based email my $msg = MIME::Lite->new ( Subject => "HTML email test", From => 'YOU@somewhere.com', To => $email, Type => 'text/html', Data => '<H1>Hello</H1><br>This is a test email. Please visit our site <a href="http://cyberciti.biz/">online</a><hr>' ); $msg->send();

Save the script and execute it. Here is an email (sample) send by above script:

Read man page of MIME::Lite for more information:

perldoc MIME::Lite