Recent Notes

Displaying keyword search results 1 - 3
Created by Dr. Xi on February 07, 2012 15:40:11    Last update: February 07, 2012 15:40:11
An alias defined in .profile does not work when you open a bash window from the desktop. Simply put, alias should be put in .bashrc ; PATH should be put in .profile . These are the facts: .profile is executed by the login shell, i.e., when you login. .bashrc is executed whenever a bash shell is opened - login or non-login. When you open a new bash window from the desktop, a non-login shell is created, it will execute .bashrc , not .profile . When you ssh to a remote system interactively, a login shell is created. When you ssh to a remote system and run a command directly, a non-login shell is created. PATH modifications should be put in .profile since it is usually...
Created by voodoo on July 11, 2009 15:14:55    Last update: July 29, 2010 22:45:48
cURL is a command line tool for transferring files with URL syntax. The main purpose and use for cURL is to automate unattended file transfers or sequences of operations. It's really easy to see HTTP headers with curl: C:\>curl --head http://www.google.com HTTP/1.0 ... or, headers and page together (dump headers to stdout): $ curl --dump-header - http://www.google.com HTTP/... Download openssl from openssl.org: curl http://www.openssl.org/source/openssl-0.9.6m.... C:\>curl --help Usage: curl [options...] <url> ...
Created by Dr. Xi on December 12, 2007 20:30:01    Last update: December 12, 2007 20:32:23
This is a script to tail a log file through the web browser. It uses AJAX, apache web server, mod_python, UNIX utilities tail (requires the --lines switch) and wc . The log file may reside on the web server or any other host accessible from the web server through SSH. Although it's written in python, it should be easy to port to other languages such as Perl. Apache httpd.conf : LoadModule python_module modules/mod_python.so ... Python script: import time, os from os.path import basename ...