Linux: cronjob
When you setup a cronjob file (/etc/cron.d/filename) , the file should include the path below: PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin:/root/bin this is because if…
When you setup a cronjob file (/etc/cron.d/filename) , the file should include the path below: PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin:/root/bin this is because if…
You can use the option : 2>&1 for this purpose. /mycommand.sh 2>&1 | mydescommand.sh
A sample function to use curl post data. $data=array() $data=array(); $data[“field1″]=”hello world”; $data[“user”]=”hello user”; curl_post($url,$data) function curl_post($url,$fields) { //open connection…
We first need to list files that are older than number of days (5) find /Data/foldername -name *.mp4 -type f…
The service record for ldap and kerberos are used to identify LDAP and Kerberos server for a domain in Active…
I built a customize alert, and there are some required fields on the form. User must provide data for these…
There will come a time when you need to start some scripts at startup, but you don’t want to to…
session_set_save_handler(“open”, “close”, “read”, “write”, “destroy”, “gc”); function read($id) { //if we can’t find the data for this session, we must…
This is mostly because the script is hang at some point , the server still keeps the connection, this will…