Q. Can you list or tell the location of FreeBSD hardware compatibility list?
A. If you are not able to find out HCL then it is available online. Here are direct links to FreeBSD Hardware compatibility List html document. FreeBSD 6.0 Hardware compatibility List (HCL), it include following topics
- Disk Controllers
- Ethernet Interfaces
- Token Ring Interfaces
- FDDI Interfaces
- ATM Interfaces
- Wireless Network Interfaces
- Miscellaneous Networks
- ISDN Interfaces
- Serial Interfaces
- Sound Devices
- Camera and Video Capture Devices
- USB Devices
- IEEE 1394 (Firewire) Devices
- Bluetooth Devices
- Cryptographic Accelerators
- Visit online
Also general discussion about the types of hardware that FreeBSD runs on, various problems and suggestions concerning what to buy or avoid: http://lists.freebsd.org/mailman/listinfo/freebsd-hardware
ow do I format Linux file system? Can you tell me command names to format and create a Linux file system?
How do I find out my Linux / UNIX system ip address, subnet and related networking information from a command prompt?
Q. How do I run a shell script from a web server or a web page under Apache or Lighttpd websever?
A. In order to run a shell script from a web page you need Apache web server configured with cgi access. Apache CGI allows documents/files in cgi-bin directory treated as application and run by server when requested rather than as documents sent to the client.. It means if you put shell script in cgi-bin directory then you are able to execute them from a web page. However, you cannot simply run shell script from a web. You need to send or print the MIME type before outputting data to the web browser from shell script. You need to add following line to script before you get output back to browser:
echo "Content-type: text/html"
Here is the script that can displays today’s date and other information related to your shell script:
# get today's date
# You must add following two lines before
# outputting data to the web browser from shell
echo "Content-type: text/html"
echo "Today is $OUTPUT <br>"
echo "Current directory is $(pwd) <br>"
echo "Shell Script name is $0"
Save the script in your cgi-bin directory and execute it from web page.
=> For more examples see how to: Run Linux / UNIX commands from a web page.
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:
# SendTo email id
my $email = 'email@example.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>'
Save the script and execute it. Here is an email (sample) send by above script:
Read man page of MIME::Lite for more information:
Q. How can I display or show today’s UNIX computer date from a shell script using echo command? How do I store date command output to a variable?
A. Date command is use to print or set the system date and time under Linux/Unix like operating systems. However some time you need to include today’s date in shell script. You need to use command substitution in your shell script to display today’s date. Bash/sh shell performs the expansion by executing command and replacing the command substitution with the standard output
of the command, with any trailing newlines deleted. Command substitution allows the output of a command to replace the command name. You can use following syntax:
For example, type the following at shell prompt to display today’s date:
$ echo "Today is $(date)"
Today is Sat Jan 28 15:48:11 IST 2006
Here is sample script, that stores today’s date in TODAY and hostname in HOST variable:
echo "Date: $TODAY Host:$HOST"
# add rest code...
Save above script and execute it. See working shell script that notify admin user if Linux/FreeBSD system load crossed certain limit
ow do I delete a file under Linux / UNIX / BSD / AIX / HP-UX operating system using command line options?