Wednesday 29 August 2012

File handling utilities

wget & curl


wget 'FILE_URL'

http://en.wikipedia.org/wiki/Wget

http://daniel.haxx.se/docs/curl-vs-wget.html



SCP

scp  FILE USERNAME@HOST:DESTIONATION_DIR


FTP

Transfer multiple file through FTP mput , mget & mdelete.

#! /bin/sh
REMOTE='host'
USER='username'
PASSWORD='pwd'
FTPLOG='ftpmput.log'
date >> $FTPLOG
ftp -n $REMOTE <<_ftp>>$FTPLOG
quote USER $USER
quote PASS $PASSWORD
bin
cd /support/touat/
mput *.txt
quit
_FTP



lftp 


sftp

Thursday 12 July 2012

Expose local directory images through Tomcat Sever


Option 1
Enable directory listing for specific URL pattern in web.xml

    listImages
    org.apache.catalina.servlets.DefaultServlet
    
        debug
        0
    
    
        listings
        true
    
    100



    listImages
    /listImages/*


Option 2 NOTE: This will affects all folders in the webapp. It is best to enable directory listing only for an individual folder by writing own Servlet to handle the request.

1.Create a Context element in an XML file: Image.xml




2.Copy the Image.xml file to $CATALINA_HOME/conf/Catalina/localhost/.

3.Enable Directory listing in in Tomcat. Edit the default servlet in the {$CATALINA_HOME}/conf/web.xml file.

    
        default
        org.apache.catalina.servlets.DefaultServlet
        
            debug
            0
        
        
            listings
            true
        
        1
    

4.Change the param-value; to true for the param-name listing section.
        
            listings
            true
           

Thursday 31 May 2012

SCM : Accurev


Just for the record, Accurev is a very good tool.

Software configuration management


http://www.accurev.com/accurev.html
http://www.accurev.com/demonstration.html

Sunday 19 February 2012

Google searching techniques



Link: url Shows other pages with links to that url

Related:url same as "what's related" on serps.

Site: domain restricts search results to the given domain.

Allinurl: shows only pages with all terms in the url.

Inurl: like allinurl, but only for the next query word.

Allintitle: shows only results with terms in title.

Intitle: similar to allintitle, but only for the next word.

"intitle:webmasterworld google" finds only pages with Webmasterworld in the title, and google anywhere on the page

Cache:url will show the Google version of the passed url.

Info:url will show a page containing links to related searches, backlinks, and pages containing the url. This is the same as typing the url into the search box.

Spell: will spell check your query and search for it.

Stocks: will lookup the search query in a stock index.

Filetype: will restrict searches to that filetype. "-filetype:doc" to remove Microsoft word files.

Daterange: is supported in Julian date format only. 2452384 is an example of a Julian date.

Maps: If you enter a street address, a link to Yahoo Maps and to MapBlast will be presented.

Phone: enter anything that looks like a phone number to have a name and address displayed. Same is true for Something that looks like an address (include a name and zip code)

Site:www.somesite.net "+www.somesite.+net"(tells you how many pages of your site are indexed by google)

Allintext: searches only within text of pages, but not in the links or page title

Allinlinks: searches only within links, not text or title
Searching for your  mp3 in google :

?intitle:index.of? mp3  {artist or album}
eg:
?intitle:index.of? mp3 A R Rahman

http://pdf.textfiles.com/security/googlehackers.pdf