Linux

Estimate emerge time

You can analyze your system’s emerge.log file to find out how long a given package took to compile and also to estimate the time of future compile jobs, or you can use genlop, which is designed for the job.

Read More
Security

Simple antivirus test using a text file

This is a simple test to check if your antivirus software is up and running Create a text file Insert the following text into the file X5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H* Save the file with the filename eicar.com Your antivirus software should detect this file as a virus and notify you about that. Your antivirus software is not working […]

Read More
Linux

MySQL via PHP Cheat Sheet

Connect to MySQL and to the database // Connect to MySQL $connect = mysql_connect(“localhost”, “mysqluser”, “userpassword”) or die(mysql_error()); // Select the database mysql_select_db(“databasename”, $connect) or die(mysql_error()); PHP Manual Reference us2.php.net/manual/en/function.mysql-connect.php Close connection // Use the variable that was used to connect to MySQL mysql_close($connect) or die(mysql_error()); // PHP Manual Reference: us2.php.net/manual/en/function.mysql-close.php Create a database mysql_create_db(“dbname”) […]

Read More
Scripting

regex –make option

Get a ready regex The –make option is described by its author as “a remedy for headaches.” It outputs a regexp for one of several common patterns that are given as arguments, as listed in table. List of ready regexps available in txt2regex Argument Description date This argument matches dates in mm/dd/yyyy format, from 00/00/0000 […]

Read More
Scripting

A-Z index of the linux Bash

alias Create an alias awk Find and Replace text within file(s) break Exit from a loop builtin Run a shell builtin cal Display a calendar case Conditionally perform a command cat Display the contents of a file cd Change Directory chgrp Change group ownership chmod Change access permissions chown Change file owner and group chroot […]

Read More