Skip to content

Instantly share code, notes, and snippets.

@silv3rm00n
silv3rm00n / gist:6211105
Created August 12, 2013 14:08
25+ examples of Linux find command – search files from command line
The Linux find command is a very useful and handy command to search for files from the command line. It can be used to search for files based on various criterias like permissions, user ownership, modification date/time, size etc. In this post we shall learn to use the find command along with various options that it supports.
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<!--
Documented at
http://linux.die.net/man/5/fonts-conf
To check font mapping run the command at terminal
$ fc-match 'helvetica Neue'
a.php ---
$a = shell_exec('php-cgi /var/www/test.php');
echo $a;
test.php ---
echo "Hello World";
/*
This will generate the data mart for following report/tables
1. report1 - grouped by referring_domain , landing_domain , campaign , source , click_date
*/
-- Create a temporary table to hold zip counts
create temporary table r_zip_cnt
(
click_id mediumint unsigned ,
cnt smallint unsigned ,
/*
This will generate the data mart for following report/tables
1. report1 - grouped by referring_domain , landing_domain , campaign , source , click_date
*/
-- Create a temporary table to hold zip counts
create temporary table r_zip_cnt
(
click_id mediumint unsigned ,
cnt smallint unsigned ,
select
c.referring_domain , SUM(zs.cnt) as zip_searches ,
Count(c.click_id) as visits ,
SUM(ds.conv) as conversions ,
SUM(ds.conv_value) as conv_value
from clicks c
left join
(
(12:39:24 IST) silv3r_m00n: if error_reporting is set to 0 , will 'log_errors' directive log anything or not ?
(12:41:44 IST) renic: TAS
(12:42:03 IST) GoogleGuy: silv3r_m00n, Of course not.
(12:42:35 IST) silv3r_m00n: renic: yes did , saw that if error_reporting = 0 then no error logging
(12:43:05 IST) GoogleGuy: silv3r_m00n, The error_reporting directive tells PHP's error handler what level of errors to report. If you tell it to report no errors at all it won't. Thus there will be nothing to log since it's not reporting any errors.
(12:43:24 IST) silv3r_m00n: GoogleGuy: read at few places "turn off error reporting on production , but log them to a file" so got confused , how to log without reporting
(12:44:09 IST) GoogleGuy: silv3r_m00n, They might be talking about display_errors. display_errors isn't error_reporting it's just whether or not PHP's error handler sends the error messages to STDOUT.
(12:44:21 IST) GoogleGuy: That's a separate directive that you should turn off in production of course.
<?php
ini_set('log_errors' , true);
ini_set('error_log' , '/var/www/php_error.txt');
ini_set('display_errors' , 0);
error_reporting(0);
mango();
ini_set('log_errors' , true);
ini_set('error_log' , '/var/www/php_error.txt');
ini_set('display_errors' , '0');
error_reporting( 0 ); //No php_error.txt created
error_reporting( E_ALL ); //php_error.txt created and works
<?
error_reporting(E_ALL);
$m = "<p>This is my tertiary message.</p>\n";
?>
<?=$m?>
<?xml version="1.0" encoding="utf-8"?>