Can You Top This? 15 Practical Linux Top Command Examples: "This article is part of the on-going 15 example series where 15 examples will be provided for a specific command or functionality. In this series, earlier we discussed about find command, crontab examples, grep command, history command, ping command, and wget examples.
In this article, let us review 15 examples for Linux top command that will [...]
Read More: Can You Top This? 15 Practical Linux Top Command Examples
Copyright © The Geek Stuff. All Rights Reserved. Support us when you shop at amazon. Thank You!
Get your copy of Vim 101 Hacks eBook.
Linux 101 Hacks eBook Password: linux-is-wonderful
10/30/2010
How to Backup Linux? 15 rsync Command Examples
How to Backup Linux? 15 rsync Command Examples: "rsync stands for remote sync. rsync is used to perform the backup operation in UNIX / Linux. rsync utility is used to synchronize the files and directories from one location to another in an effective way. Backup location could be on local server or on remote server. Important features of rsync Speed: First time, rsync [...]
Read More: How to Backup Linux? 15 rsync Command Examples
Copyright © The Geek Stuff. All Rights Reserved. Support us when you shop at amazon. Thank You!
Get your copy of Vim 101 Hacks eBook.
Linux 101 Hacks eBook Password: linux-is-wonderful
"
Read More: How to Backup Linux? 15 rsync Command Examples
Copyright © The Geek Stuff. All Rights Reserved. Support us when you shop at amazon. Thank You!
Get your copy of Vim 101 Hacks eBook.
Linux 101 Hacks eBook Password: linux-is-wonderful
10/23/2010
HowTo: Use Bash Parameter Substitution Like A Pro
HowTo: Use Bash Parameter Substitution Like A Pro: "
The $ character is used for parameter expansion, and command substitution. You can use it for manipulating and/or expanding variables on demands without using external commands such as sed or awk."
The $ character is used for parameter expansion, and command substitution. You can use it for manipulating and/or expanding variables on demands without using external commands such as sed or awk."
9/06/2010
1/10/2010
Solve blank web console on VMware 2.0.x
======Blank Web Console on VMware 2.0.x======
Then search for "compressableMimeType" which is compress javascript, css, etc...
Change it to compressableMimeType="text/html" only. That mean it only compress html.
This is a one way to solve the blank web console on VMware 2.0.x
vim /usr/lib/vmware/webAccess/tomcat/apache-tomcat-6.0.16/conf/server.xml
Then search for "compressableMimeType" which is compress javascript, css, etc...
Change it to compressableMimeType="text/html" only. That mean it only compress html.
This is a one way to solve the blank web console on VMware 2.0.x
1/03/2010
Using PHP curl to talk to iTunes
$ch = curl_init();
$timeout = 10;
$useragent = "iTunes/9.02 (Macintosh; U; PPC Mac OS X 10.2";
$header = "X-Apple-Store-Front: 143441-1";
$url = "http://ax.itunes.apple.com/WebObjects/MZStore.woa/wa/viewTopLegacy?id=25204&popId=30&genreId=36"
curl_setopt ($ch, CURLOPT_URL, $url);
curl_setopt ($ch, CURLOPT_HTTPHEADER, array($header));
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
curl_setopt ($ch, CURLOPT_USERAGENT, $useragent);
header($header);
$fp = fopen($file,'w+');
curl_setopt($ch, CURLOPT_FILE,$fp);
$http_conn = curl_exec($ch);
$info = curl_getinfo($ch);
$timeout = 10;
$useragent = "iTunes/9.02 (Macintosh; U; PPC Mac OS X 10.2";
$header = "X-Apple-Store-Front: 143441-1";
$url = "http://ax.itunes.apple.com/WebObjects/MZStore.woa/wa/viewTopLegacy?id=25204&popId=30&genreId=36"
curl_setopt ($ch, CURLOPT_URL, $url);
curl_setopt ($ch, CURLOPT_HTTPHEADER, array($header));
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
curl_setopt ($ch, CURLOPT_USERAGENT, $useragent);
header($header);
$fp = fopen($file,'w+');
curl_setopt($ch, CURLOPT_FILE,$fp);
$http_conn = curl_exec($ch);
$info = curl_getinfo($ch);
1/02/2010
Sending email in PHP script using SMTP command
#To connect to server. The fsocketopn will time out after 300
#seconds if the connection failed. The $errno and $errstr
#will contain the error number and the error message if an
#error happens.
$smtp_server = fsockopen("mail.mydomain.com", 25, $errno, $errstr, 300);
if(!$smtp_server){
echo "$errstr ($errno)\r\n";
}
#The fgets() in the areas where the SMTP server will reply your client, the script will then
#wait for the server and not just flood it with data.
$inn = fgets($smtp_server, 1024);
fputs($smtp_server, "HELO mail.mydomain.com\r\n");
$inn = fgets($smtp_server, 1024);
fputs($smtp_server, "MAIL FROM:\r\n");
$inn = fgets($smtp_server, 1024);
fputs($smtp_server, "RCPT TO:\r\n");
$inn = fgets($smtp_server, 1024);
fputs($smtp_server, "DATA\r\n");
$inn = fgets($smtp_server, 1024);
fputs($smtp_server, "From:\r\n");
fputs($smtp_server, "To:\r\n");
fputs($smtp_server, "Subject: Downloads\r\n");
fputs($smtp_server, "\r\n");
fputs($smtp_server, $message."\r\n");
fputs($smtp_server, ".\r\n");
$inn = fgets($smtp_server, 1024);
fputs($smtp_server, "QUIT\n");
$inn = fgets($smtp_server, 1024);
fclose($smtp_server);
#seconds if the connection failed. The $errno and $errstr
#will contain the error number and the error message if an
#error happens.
$smtp_server = fsockopen("mail.mydomain.com", 25, $errno, $errstr, 300);
if(!$smtp_server){
echo "$errstr ($errno)\r\n";
}
#The fgets() in the areas where the SMTP server will reply your client, the script will then
#wait for the server and not just flood it with data.
$inn = fgets($smtp_server, 1024);
fputs($smtp_server, "HELO mail.mydomain.com\r\n");
$inn = fgets($smtp_server, 1024);
fputs($smtp_server, "MAIL FROM:
$inn = fgets($smtp_server, 1024);
fputs($smtp_server, "RCPT TO:
$inn = fgets($smtp_server, 1024);
fputs($smtp_server, "DATA\r\n");
$inn = fgets($smtp_server, 1024);
fputs($smtp_server, "From:
fputs($smtp_server, "To:
fputs($smtp_server, "Subject: Downloads\r\n");
fputs($smtp_server, "\r\n");
fputs($smtp_server, $message."\r\n");
fputs($smtp_server, ".\r\n");
$inn = fgets($smtp_server, 1024);
fputs($smtp_server, "QUIT\n");
$inn = fgets($smtp_server, 1024);
fclose($smtp_server);
訂閱:
文章 (Atom)
