Google have launched a site (link) for the Indian General Election 2009.

Google have launched a site (link) for the Indian General Election 2009.


Can personalize to your location and get information about.

1) latest election news
2) MP profiles
3) constituency statistics
4) candidate quotes
5) polling booth locations and more 

Read more


what are init 0 init 1 init 2 init 3 init 4 init 5 init 6 init s init S init metc

The best solution to know about these init levels is to understand the " man init " command output on Unix.

There are basically 8 runlevels in unix. I will briefly tell some thing about the different init levels and their use. 
Run Level:  At any given time, the system is in one  of  eight  possible run  levels.  A  run level is a software configuration under which only a selected group of processes  exists.  Processes spawned  by init for each of these run levels are defined in /etc/inittab. init can be in one of eight  run  levels,  0-6 and  S  or  s (S and s are identical). The run level changes when a privileged user runs /sbin/init.

init 0 :  Shutdown (goes thru the /etc/rc0.d/* scripts then halts)
init 1  :  Single user mode or emergency mode means no network no multitasking is present in this mode only root has access in this runlevel
init 2  :  No network but multitasking support is present .
init 3  :  Network is present multitasking is present but with out GUI .
init 4  :  It is similar to runlevel 3; It is reserved for other purposes in research.
init 5  :  Network is present multitasking and GUI is present with sound etc.
init 6  :  This runlevel is defined to system restart.
init s   : Tells the init command to enter the maintenance mode. When the
system enters maintenance mode from another run level, only the system console
is used as the terminal.
init S  : Same as init s.
init m : Same as init s and init S.
init M : Same as init s or init S or init m.

We can take it from above that 4 options(S,s,M,m) are synonymous.

Read more


Difference between init 6 and reboot - Unix commands?

Always perform init 6.

init 6 performs reboot of machine in an orderly manner and in a clean way. It changes the runlevel of “svc.startd” daemon to execute rc0 kill scripts.

reboot performs very very quick reboot. It does not execute rc0 kill scripts. It just unmounts filesystem and restarts the system.

While doing a live-upgrade of OS & any patch-updates etc. only init 6 is strongly recommended.

Read more


How to add image beside post titles in blogspot or blogger?

How to add image beside post titles in blogspot or blogger?

If you observe the post titles in my blog, each post title starts with one image looks like below,

To add images like this for each of the posts in your blog all you need to do is to just follow the below steps.
  • Create a light wait image of your favourite choice.
  • Make sure that the logo/image format and name end with .icoEx File name : mylogo.ico
  • Now upload it to a photo or file hosting site ex : Yahoo Geocities http://www.geocities.com/krishnaspage/mylogo.ico
  • Once your icon is accessible outside go to Dashboard in your blog
  • Dashboard->Layout->Edit HTML> Check the expand Widget Templates
  • Back up the existint template
  • Now start editing HTML code
  • Fine the below line
<a expr:href='data:post.url'><data:post.title/></a>

  • change the above line to look like below
<a expr:href='data:post.url'>
<img src='URL of your image' style='border: 0; margin: 0; padding: 0;'/> &#160;
<data:post.title/></a>

once you changed this save the template and preview it. Now you should be able to see the images besdie your post titles.

Read more


Logo/icon/image on browser address bar - Fevicon

Fevicon : Fevicon is the icon or image displayed at the left side of browser's title bar.

Generally for all blogs sponsored by blogspot will be a Big orange B symbol as the fevicon. But many bloggers love to change this to their loved ones.
In my blog the fevicon is some thing like below
<link rel='icon' href='http://www.geocities.com/krishnaspage/mylogo.ico' type='image/x-icon' />
<link rel='shortcut icon' href='http://www.geocities.com/krishnaspage/mylogo.ico' type='image/x-icon' />

</head>
  • Preview the template .
  • You should be able to see the your favorite icon in the browser's title bar.

Read more


Trip to Talakad, Somanathpura, Shivanasamudram, Gagana Chukki, Bhara Chukki

One day trip to Talakad, Somanathpura, Shivanasamudram, Gagana Chukki, Bhara Chukki 

We were around 15 members this time; almost all are looking for a trip since long time, which was Ugadi festival - holiday for us. We were in search of places to go from Bangalore. Many recommendations but these are the places which were finalized - Talakad, Somanathpura, Shivanasamudram, Gagana Chukki, Bhara Chukki. One of us booked a tempo traveler, accommodate all of us. As planned, we started around 6 AM in the morning from Koramangala. I should say a big thanks to my friend who fed us “Ugadi pachadi”. With the combination of different tastes and different persons in van our journey started. 


First place we reached is Somanthpura
It was really a fantastic historical place. The sculptures and design of the temple is amazing. The polished stone on the temple attracts our eye. The designs carved on the temple walls are worth watching here.


Second place we reached is Talakad
Before reaching Talakad we visited one Siva temple which is on a hill. Not sure what is the village name? But it is on the opposite bank of “Jaladhama” resort. 
This is a historical place with a small bay of Kaveri river. Though we can’t enjoy this place with much sceneries and authentic services we can really enjoy the river bath if water was there. We can go for a raft ride with very littlie amount. We won’t find any Hi-Fi hotels or restaurants here, so all we need to do is to depend on the small hotels there. With our request they will cook non-veg as well immediately and serve us. Though it was not so great we had some food. Then we visited the temples buried under sand. Got to know some littile history with our guide (Mariyamma). Actually with out guide itself we can get more details, as I feel guide is not at all required. We wasted most of our time here other wise we could have covered many other places.


Then we had been to Bhara chukki water falls, it’s really good. Some of us enjoyed water splashes here. By that time slowly darkness came into pictures so we quickly moved to Gagana chukki falls and had glance of it. On the way, we saw “Sivana samudra” electricity generation plant. Reached Bangalore by 10:30 PM.Due to heavy sun we slept deeply that day.I love visiting Archeological places so I really enjoyed this trip.
Thanks to everyone : Ramana,Surendra,Kishore,Ravi teja, Nataraj(Teja's uncle), Anand,Ravi,PK, Chandu etc.


Route map:
  • Bangalore -> Ramnagar -> Channapatna-> take left turn -> Malavalli and then follow the sign boards.
                OR

  • Bangalore-Bidadi-Ramanagaram-Chennapatna-Maddur-Malavalli-Bharachukki-Gaganchukki-Talkad
Some thing from other web pages about this places :
·          Somnathpura : (http://en.wikipedia.org/wiki/Somanathapura)
                           Somanathapura (also known as Somnathpur) is a town located 30 km from Mysore city in Mysore district, Karnataka, India. Somanathapura is famous for the Chennakesava Temple (also called Kesava or Keshavatemple) built by Soma, a dandanayaka (commander) in 1268 CE under Hoysala king Narasimha III, when the Hoysalas were the major power in South India. The Keshava temple is one of the finest examples of Hoysala architecture and is in a very well preserved condition. The temple is conservated by Archeological Survey of India under the category of protected heritage sites
·          Talakad : (http://en.wikipedia.org/wiki/Talakad)
                         Talakad(also known as Talakadu) (Kannada: ತಲಕಾಡು) is a town on the left bank of the Kaveri river at a spot where the river makes a sharp bend. It is 45 km from Mysore and 185 km from Bangalore in Karnataka, India. A historic site, Talakad once had over 30 temples that today are buried in sand. Now it is a scenic and spiritual pilgrimagecenter.[1] Here the eastward flowing Kaveri river changes course and seems magnificently vast as here the sand on its banks spreads over a wide area.[2]
·          Shivanasamudram : (http://wikitravel.org/en/Shivanasamudram)
                             Shivanasamudra is the location of a HydroElectric project, but more pertinently it is also home to a few lovely water falls. It is located in Karnataka.Shivana Samudra Falls on the Cauvery River near Mysore .The Shivanasamudra falls are formed on the Cauvery river. A little distance before the falls, the river splits into two, forming an island. The two streams falls down to the same point and flows downstream. The two falls are called
  • Gagana Chukki (90 metres) (Waterfalls) :
  • Bhara Chukki (69 metres) (Waterfalls) :
The two falls are really majestic in the monsoon season. Shivanasamudra is probably the largest waterfall in the region after Jog Falls. The place is also credited for hosting the first hydroelectric project in India. Here, Kaveri splits into two, falls into a valley in two separate places called Gaganachukki and Bharachukki and re-unites downstream. A good lot of water falls down from both the waterfalls. Gaganachukki especially is a steep fall where water gushes down with great velocity. The two waterfalls are around a 15-minute drive apart and make beautiful picnic locations. 
Some thing about place:
The eastern falls - Bhara Chukki 

After getting down the bus at Shivasamudram, which is popularly called Bluff, we walked along the banks of Cauvery for two km through green fields interposed hither and thither with multitudes of young trees before we approached the waterfall.

From the watchtower, one can view the falls where the river plunges downward in a wonderful cascade, sending up dense clouds of mist, presenting a breathtaking scene. We sat on one of the stone benches overlooking the falls which plunges to a depth of 300-350 ft. Shivasamudram falls is the second biggest water falls in India.
Cauvery, called the Ganga of the South, takes its birth at Talacauvery in western ghats in Kodagu district and traverses through Hassan, Mysore, Mandya and Bangalore districts, joining with rivers Harangi, Hemavathi, Lakshmana Thirtha and Kapila. Before coursing into Tamilnadu, it leaves behind many resplendent waterfalls in its course, among which Shivasamudram falls is an important one.
The western falls - Gagana Chukki 




At Shivasamudram, the river branches into two, creating the second largest island in its course. There are a group of ancient temples situated in this island. It is believed that very long ago there was a village in this island. Each branch of the river at Shivasamudram has a separate falls - the western falls known as Gagana Chukki and the eastern falls, Bhara Chukki.

The 90-metre falls on the river rushing through the huge boulders attract the tourists during July-August when the river Kabini also floods along with Cauvery.
Bhara Chukki lies a km or so away from Gagana Chukki. On the way to Bhara Chukki, we visited an ancient dargah situated along the bank, which attracts hundreds of Muslims everyday to visit and worship. After a few yards of walk, we found Bhara Chukki falls, raising a dense mist to a height of about 300 ft. Multitudes of tourists, new couples and youngsters come here to see the natural beauty in its magnificent glory. Compared to Gagana Chukki, Bhara Chukki wears a more serene look, owing to the steady sheet of water falling without many boulders hindering its course downward. Both Gagana Chukki and Bhara Chukki are a paradise for the nature lovers.
After the turbulent fall, the river traverses in a quite manner through a thick green valley at a depth of about 400 feet towards the east.
Shivasamudram is also famous for its hydro power station which was started in 1902 by Sheshadri Ayyar, a dewan of Mysore. This is said to be the first hydro power station in Asia and from here power was supplied to Bangalore -- the first city to get power in India - in 1906 and then to Kolar Gold Fields and Mysore.
In the hydro station, power is produced by running the water through a pipe having sufficiently larger diameter and kept at an inclined position from a height of 350 ft. Through a turbine, the hydraulic force of water is transmitted to an alternator which generates electric power.
There was a trolley for the visitors to see the working of the hydro station. But now, unfortunately, those who want to go for a trolley ride, return with disappointment. It is because the use of trolley was stopped six years ago when a militant group vowed that it will blow up the hydro station. If the authorities commence the trolley ride again, it will attract more visitors.
Shivasamudram lies in its unpolluted ambience which adds beauty to the place. Nearby the falls, there are no shops, bars and restaurants or any other kind of disturbance. However, it needs basic facilities such as water, shelter and toilet. Better facilities will no doubt attrabct more tourists.
Best Blogs I found about this place:





Somanathpura,Talakad,Baarachukki,Gagana chukki

Read more


How to stop /usr/lib/sendmail -bd -q15m in Solaris 10

How to stop sendmail service irritates us by consuming all most all the CPU ..by creating useless procees like 

/usr/lib/sendmail -bd -q15m

So for time being if we are able to stop this service i.e sendmail service our CPU can be well used.

So to stop this process all we need to do is to just run the following command

bash-3.00# which svcadm
/usr/sbin/svcadm
bash-3.00#svcadm disable sendmail
bash-3.00#svccfg -s sendmail setprop config/local_only = true
bash-3.00# svcadm refresh sendmail
bash-3.00# svcadm restart sendmail

To kill the process of this type 

ps -eaf | awk -F" " '{print $2}' |xargs  kill -9 

Read more


How to increase /tmp size in solaris ?

How to increase /tmp size in Solaris ?


You can Increase the tmp space by adding a new and big swap file. 

To add a swap file, follow these instructions:

Syntax: mkfile sizeoffile // => it creates a swap file
Ex:
   bash-2.05#mkfile 1500m /opt/myswapfile

Syntax: swap -a /path/file => adds the swap file
Ex:
 bash-2.05#swap -a /opt/myswapfile

To view the added swap file:
Ex: 
 swap -l => view added swap file

Note : 
bash-2.05# which mkfile
/usr/sbin/mkfile

bash-2.05# which swap
/usr/sbin/swap



Read more


I’m paid by mGinger

I contemplated mGinger (Bangalore based Advertisement company) as another best way of generating money. It really worked like a charm. Though it took almost one year to generate just 356 R/-. Of course I have very less (around 12) people in my mGinger account hence less amount in long time. I really feel happy about this creative idea by mGinger team. I was paid by mGineger for this amount through ICICI bank’s cheque. mGinger is such an authentic service; it pays even to a lazy customer like me who have registered just 10+ people.

Make money by just deleting the read SMS flashed on your mobile screen. With out depositing a single penny in my savings bank, I got 300+ rupees into my savings account today. 

To yield 350 Rupees of interest also you should keep X amount in our savings bank account. But I got that with out any pain. I am sure many times my network people might be irritated with the flash of mGinger SMS on their mobile screen, but at least once in a month they might have benefited with the same. What’s wrong? refer your friends and allow them to earn, as you.

Click any of the below links to join mGinger.

P.S: This is my first earning for being part of online advertisement community. As decided earlier I am planning to use this small chunk for little charity.
Date : 8th April 2009 Amount : 356 R/-  ICICI Cheque No: 583080

Read more


Solaris commands - Sorted according to use

Solaris Commands

I would like to share you all the best sorted all solaris commands in this post. Though this was with me since long time I realized today, the need or ease in it,  hence sharing it with you all. I am sure this sorted list will definitely help you compared to any other command reference manual due to its way of presentation.

1.Disk Commands
26. /bin/mount -F hsfs -o ro /dev/sr0 /cdrom
/* Mount an ISO 9660 CDROM */
27. /usr/bin/iostat -E
/* Command to display drives statistics */
28. du -ad /var | sort -nr
/* Report the the disk used in /var in reverse order */
29. du -k .
/* Report disk usage in Kilobytes */
30. du -sk * | sort -nr | head
/* Shows the top ten largest files/directories */
31. du -sk *|sort -k1,1n
/* Reports total disk space used in Kilobytes in present directory */
32. du -sk .
/* Report total disk usage in Kilobytes */
33. fdformat -d -U
/* Format diskette */
34. mount -F hsfs -o ro `lofiadm -a /export/temp/software.iso` /mnt
/* Mount an ISO Image */
35. newfs -Nv /dev/rdsk/c0t0d0s1
/* To view the superfblocks available */
36. One-liner to copy a partition table
/* prtvtoc /dev/dsk/c1t2d0s2 | fmthard -s - /dev/rdsk/c1t3d0s2 */
37. prtvtoc /dev/rdsk/c0t0d0s2
/* Disk geometry and partitioning info */
38. prtvtoc /dev/rdsk/c0t0d0s2 | fmthard -s - /dev/rdsk/c0t1d0s2
/* Copy partition table from one disk to another */
39. quot -af
/* How much space is used by users in kilobytes */
40. volrmmount -i floppy
/* Mount a floppy or other media easily by its nickname. */

Driver Parameters
41. ndd /dev/ip ip_forwarding
/* Show the ip_forwarding variable in the kernel */
42. ndd /dev/ip ip_forwarding 1
/* Set the ip_forwarding variable in the kernel */
43. ndd /dev/ip \?
/* Show all IP variables set in the kernel */

File Manipulation
44. dos2unix | -ascii
/* Converts DOS file formats to Unix */
45. fold -w 180
/* To break lines to have maximum char */
46. split [-linecount] [file]
/* Split files into pieces */
47. [vi] : %s/existing/new/g
/* Search and Replace text in vi */
48. [vi] :set list
/* Show non-printing characters in vi */
49. [vi] :set nu
/* Set line numbers in vi */
50. [vi] :set ts=[num]
/* Set tab stops in vi */

2  File System
51. /sbin/uadmin x x
/* Syncs File Systems and Reboots systems fast */
52. awk ' END {print NR}' file_name
/* Display the Number of lines in a file */
53. cat /dev/null > filename
/* Zero's out the file without breaking pipe */
54. cksum [filename]
/* View the checksum value for the given file */
55. dd if=/dev/rdsk/... of=/dev/rdsk/... bs=4096
/* Make a mirror image of your boot disk */
56. df -k | grep dg| awk '{print $6}' |xargs -n 1 umount
/* Unmount all file systems in disk group dg */
57. fsck -F ufs -o b=97472 /dev/rdsk/c0t0d0s0
/* Check and repair a UFS filesystem on c0t0d0s0, using an alternate superblock */
58. fsck -F ufs -y /dev/rdsk/c0t0d0s0
/* Check a UFS filesystem on c0t0d0s0, repair any problems without prompting. */
59. fsck -F ufs /dev/rdsk/c0t0d0s0
/* Check a UFS filesystem on c0t0d0s0 */
60. gzip -d -c tarball.tgz | (cd /[dir];tar xf - ) &
/* Unpacking tarballs to diff location */
61. gzip -dc file1.tar.gz | tar xf -
/* Unpack .tar.gz files in place */
62. ln [-fhns]
/* Creating hard links and soft links */
63. ls -al | awk '$3 == "oracle" || $3 == "root" {print $9}'
/* List all file names by testing owner */
64. ls -l | sort +4n
/* List files by size */
65. ls -la | awk '{ print $5," ",$9 }' | sort -rn
/* File sizes of current directory */
66. ls -lR | awk '{total +=$5};END {print "Total size: " total/1024/1024 "MB" }'
/* Recursive directory size calculations in MB */
67. mkisofs -l -L -r -o [image-name].iso [directory]
/* Create an ISO image of a directory */
68. mount -F ufs -o rw,remount /
/* Used to remount root to make it writeable */
69. mount -o remount,logging /spare
/* Re-mount the ro file system rw and turn on ufs logging */
70. mount DOS fdisk partition from Solaris
/* mount -f pcfs /dev/dsk/c0d0p1 /export/dos */
71. mv [filename]{,.new_suffix}
/* Renaming file */
72. pax -rw . /newdir
/* Efficient alternative for copying directories */
73. prtvtoc /dev/rdsk/c0t0d0s2 | fmthard -s - /dev/rdsk/c0t1d0s2
/* Cloning Partitiontables */
74. rpm -q --queryformat '%{INSTALLPREFIX}\n' [packagename]
/* [Linux] Locate binaries */
75. tar cf - . | (cd /newdir ; tar xf -)
/* Recursively copy files and their permissions */
76. tar cvf filename.tar
/* Create a tape (tar) archive */
77. tar xvf filename.tar
/* Extract a tape (tar) archive */
78. X=$(wc -l <>
/* Count number of lines in a file into a variable (ksh) */
79. zcat
/* Extract the patch_file that is a compressed tar file */
80. zcat [cpio file] | cpio -itmv
/* Show the contents of a compressed cpio */

3 File Transfer
81. find . -depth | cpio -pdmv /path/tobe/copied/to
/* Fast alternative to cp -pr */
82. find . -follow | cpio -pdumL /path/tobe/copied/to
/* Copy with symbolic links to be followed */
83. get filename.suffix |"tar xf -"
/* Undocumented Feature of FTP */
84. Move any file(s) without actually touching them
/* ssh cd /some/directory \&\& tar cf - | ssh cd /some/direstory \&\& tar xvf - */
85. put "| tar cf - ." filename.tar
/* Undocumented Feature of FTP */
86. sendport
/* FTP command for transferring large numbers of files within the same control session */

General
87. /bin/printf '%d\n' '0x'
/* Converts hexadecimal number to decimal. */
88. /usr/bin/catman -w
/* Create windex databases for man page directories */
89. echo 'obase=16;255' | bc
/* Simple way to convert decimal to hex */
90. FQ_FILENAME=; echo ${FQ_FILENAME%/*}
/* Extract directory from fully-qualified file name. */
91. mailx -H -u
/* List out mail headers for specified user */
92. ps -ef | grep -i $@
/* Access common commands quicker */
93. set filec
/* Set file-completion for csh */
94. uuencode [filename] [filename] | mailx -s "Subject" [user to mail]
/* Send files as attachments */
95. xauth -f /home/${LOGNAME} extract - ${DISPLAY} | xauth merge -
/* Allow root to xdisplay after su */

Hardware
96. cfgadm
/* Verify reconfigurable hardware resources */
97. m64config -depth 8|24
/* Sets the screen depth of your M64 graphics accelerator */
98. m64config -prconf
/* Print M64 hardware configuration */
99. m64config -res 'video_mode'
/* Change the resolution of your M64 graphics accelerator */
100. prtpicl -v | grep sync-speed
/* Discover SCSI sync speed */

Kernel
101. /usr/sbin/modinfo
/* Display kernel module information */
102. /usr/sbin/modload
/* Load a kernel module */
103. /usr/sbin/modunload -i
/* Unload a kernel module */
104. /usr/sbin/sysdef
/* Show system kernal tunable details */
105. nm -x /dev/ksyms | grep OBJ | more
/* Tuneable kernel parameters */
106. update_drv -f [driver name]

/* Force a driver to reread it's .conf file without reloading the driver */

4.Memory
107. pagesize -a
/* Available page sizes for Solaris 9 */
108. prtconf | grep Mem
/* Display Memory Size of the local machine. */

Network Information
109. arp -a
/* Ethernet address arp table */
110. arp -d myhost
/* Delete an ethernet address arp table entry */
111. lsof -iTCP@10.20.2.9
/* Display open files for internet address */
112. named-xfer -z qantas.com.au -f /tmp/allip
/* Get All IP Addresses On A DNS Server */
113. ndd /dev/arp arp_cache_report
/* Prints ARP table in cache with IP and MAC address */
114. netstat -a | grep EST | wc -l
/* Displays number active established connections to the localhost */
115. netstat -a | more
/* Show the state of all the sockets on a machine */
116. netstat -i
/* Show the state of the interfaces used for TCP/IP traffice */
117. netstat -k hme0
/* Undocumented netstat command */
118. netstat -np
/* Similar to arp -a without name resolution */
119. netstat -r
/* Show the state of the network routing table for TCP/IP traffic */
120. netstat -rn
/* Displays routing information but bypasses hostname lookup. */
121. snoop -S -ta [machine]
/* Snoop for network packets and get size and time stamp entries. */
122. traceroute
/* Follow the route to the ipaddress */

Network Tuning
123. /sbin/ifconfig hme0:1 inet 10.210.xx.xxx netmask 255.255.0.0 broadcast
10.210.xxx.xxx
/* Virtual Interfaces */
124. /sbin/ifconfig hme0:1 up
/* Bring virtual interface up */
125. /usr/sbin/ndd -set /dev/hme adv_100fdx_cap 1
/* Nailling to 100Mbps */
126. ifconfig eth0 10.1.1.1 netmask 255.255.255.255
/* Add an Interface */
127. ifconfig eth0 mtu 1500
/* Change MTU of interface */
128. ndd -set /dev/ip ip_addrs_per_if 1-8192
/* To set more than 256 virtual ip addresses. */
129. ndd -set /dev/tcp tcp_recv_hiwat 65535
/* Increase TCP-receivebuffers on Sol2.5.1 systems with 100BaseTx */
130. ndd -set /dev/tcp tcp_xmit_hiwat 65535
/* Increase TCP-transmitbuffers on Sol2.5.1 systems with 100BaseTx */


5. Processes
131. /usr/proc/bin/ptree
/* Print the parent/child process 'tree' of a process */
132. /usr/proc/bin/pwdx
/* Print the working directory of a process */
133. /usr/ucb/ps -aux | more
/* Displays CPU % usage for each process in ascending order */
134. /usr/ucb/ps -auxww | grep
/* Gives the full listing of the process (long listing) */
135. coreadm -i core.%f.%p
/* Append program name and process id to core file names */
136. fuser -uc /var
/* Processes that are running from /var */
137. ipcs
/* Report inter-process communication facilities status */
138. kill -HUP `ps -ef | grep [p]roccess | awk '{print $2}'`
/* HUP any related process in one step */
139. lsof -i TCP:25
/* Mapping port with process */
140. pfiles
/* Shows processes' current open files */
141. pkill -n
/* Kill a process by name */
142. prstat -a
/* An alternative for top command */
143. ps -edf -o pcpu,pid,user,args
/* Nicely formatted 'ps' */
144. ps -ef | grep -i | awk '{ print $2 }'
/* Creates list of running PID by */
145. ps -ef | grep -i | awk '{ print $2 }'
/* Creates list of running PID by */
146. ps -ef | grep | grep -v grep | cut -c 10-15 | xargs kill -9
/* Find and kill all instances of a given process */
147. ps -ef | more
/* Show all processes running */
148. ps -ef|grep -v "0:00"|more
/* Gives you a list of any process with CPU time more than 0:00 */
149. ps -eo pid,args
/* List processes in simplified format */
150. ps -fu oracle|grep pmon
/* See which instances of Oracle are running */
151. top -b 1
/* Returns the process utilizing the most cpu and quits */

Resource Management
152. /usr/bin/ldd [filename]
/* List the dynamic dependencies of executable files */
153. /usr/proc/bin/pmap pid
/* Report address space map a process occupies */

Route Configuration
154. route add net 128.50.0.0 128.50.1.6 1
/* Add a route to the routing table */
155. route change 128.50.0.0 128.50.1.5
/* Changes the destination address for a route */
156. route delete net 128.50.0.0 128.50.1.6
/* Delete a route from the routing table */
157. route flush
/* Flush the routing table, which will remove all entries */
158. route get [hostname]
6
/* Which interface will be used to contact hostname */
159. route monitor
/* Monitor routing table lookup misses and changes */

Searching Items
160. cat | awk '{if (substr($1,1,1) == '#') print $0 }'
/* Print all lines in a file beginning with a specific character */
161. egrep "patterna|patternb"
/* Search for multiple patterns within the same file */
162. find -name "" -exec rm -rf {} \;
/* Recursively finds files by name and automatically removes them */
163. find . -type f -print | xargs grep -i [PATTERN]
/* Recursive grep on files */
164. find . ! -mtime - | /usr/bin/xargs rm -rf
/* Finds and removes files older than specified */
165. find . -exec egrep -li "str" {} \;
/* Find a string in files starting cwd */
166. find . -mtime -1 -type f
/* Find recently modified files */
167. find . -type f -exec grep "" {} \; -print
/* Find files (and content) containing within directory tree */
168. find . -type f -exec grep -l "" {} \;
/* Find files (and content) containing within directory tree */
169. find ./ \! -type f -exec ls -l {} \;|grep -v '^[l|p|s|-]'|grep -v 'total' | wc
-l
/* Find number of directories under the current directory */
170. find / -fstype nfs -prune -o fstype autofs -prune -o -name filename -print
/* find without traversing NFS mounted file systems */
171. find / -mtime <# of days>
/* Find files modified during the past # of days */
172. find / -perm -2 -a ! -type l
/* Find files writable by 'others' */
173. find / -type f |xargs ls -s | sort -rn |more
/* List files taking up the most system space */
174. find / -user
/* Find all files owned by */
175. find / -xdev -type f -ls|sort -nr -k 7,7
/* Find largest files in a file system */
176. find / | grep [file mask]
/* Fast way to search for files */
177. find /proc/*/fd -links 0 -type f -size +2000 -ls
/* Find large files moved or deleted and held open by a process */
178. grep /var/sadm/install/contents| awk '{ print $1 ' '
$10 }'
/* Find which package contains a particular file */
179. ls -lR | grep
/* Fast alternative to find. */
180. pkgchk -l -p /absolute/path/todir
/* Which package does this file belong to? */

Security
181. crypt abc && rm abc.cr
/* Decrypting a file that has been encrypted */
182. crypt abc.cr && rm abc
/* File encryption with crypt */
183. echo 'Please go away' > /etc/nologin
/* Stops users logging in */
184. find / -perm -0777 -type d -ls
/* Find all your writable directories */
185. find / -type f -perm -2000 -print
/* Find all SGID files */
186. find / -type f -perm -4000 -print
7
/* find all SUID files */
187. getpwenc [encryption scheme] password
/* Genrate passwords for LDAP Using 'getpwenc' Utility */
188. trap 'exit 0' 1 2 3 9 15
/* Trap specific signals and exit */
189. vi -x [filename]
/* Encrypt a file with vi editor */

Setting Term Options
190. stty erase ^?
/* Set the delete key to delete a character */
191. stty erase ^H
/* Set the backspace to delete a character */
192. stty sane
/* Reset terminal after viewing a binary file. */
193. tput rmacs
/* Reset to standard char set */

Snoop
194. snoop -d pcelx0
/* Watch all the packets on a device */
195. snoop -i /tmp/mylog -o /tmp/newlog host1
/* Filter out all the host1 packets and write them to a new logfile */
196. snoop -i /tmp/mylog -v -p101
/* Show verbose info on packet number 101 in the logfile */
197. snoop -i /tmp/mylog host1 host2
/* View packets from a logfile between hosts1 and host2 */
198. snoop -o /tmp/mylog pcelx0
/* Save all the packets from a device to a logfile */
199. snoop -s 120
/* Return the first 120 bytes in the packet header */
200. snoop -v arp
/* Capture arp broadcasts on your network */
201. snoop port [port-number]
/* Monitor particular port for traffic */

Swap Files
202. mkfile -nv 10m /export/disk1/myswap
/* Makes an empty 10 Megabyte swapfile in /export/disk */
203. mkfile -v 10m /export/disk1/myswap
/* Makes a 10 Megabyte swapfile in /export/disk */

Swap Space
204. swap -a /export/disk1/swapfile
/* Add a swap file */
205. swap -d /dev/dsk/c0t0d0s4
/* Delete a swap device */
206. swap -l
/* List the current swap devices */
207. swap -s
/* List the amount of swap space available */

System Configuration
208. /usr/sbin/eeprom auto-boot? false
/* Changes eeprom autoboot? setting without going to Ok prompt */
8
209. /usr/sbin/eeprom diag-switch? true
/* Set the system to perform diagnostics on the next reboot. */
210. /usr/sbin/eeprom local-mac-address?=true
/* Multiple Port Network Card Setting */
211. /usr/sbin/grpck
/* Check /etc/group file syntax */
212. /usr/sbin/pwck
/* Check /etc/passwd file syntax */
213. /usr/sbin/sys-unconfig
/* Clear host specific network configuration information */
214. /usr/sbin/useradd
/* Add a new user to the system */
215. drvconfig ; disks
/* Adding hot-plug disks to system */

System Information/Monitoring
216. /bin/echo "0t${stamp}>Y\n
/* Convert UNIX timestamp to something human-readable */
217. /usr/sbin/eeprom
/* Show eeprom parameters */
218. /usr/sbin/prtconf -vp
/* Show system configuration details */
219. coreadm -e log
/* Report global core */
220. grep "\-root" /var/adm/sulog | grep -v \+ | tail -25
/* List most recent attempts to switch to superuser account. */
221. isainfo -bv
/* Quickly checkout if machine is in 32 or 64 bit mode */
222. last
/* Tells who was or still is on the system */
223. logger -i
/* Log the process ID */
224. prtconf -pv | grep banner-name |awk -F\' ' { print $2 } ' | head -1
/* Show actual model name of machine */
225. prtdiag -v
/* System Diagnostics */
226. prtpicl -v | grep wwn
/* A command to find persistent binding of storage */
227. psradm -f [processor id]
/* Take processor offline */
228. psrinfo | wc -l
/* Display number of processors */
229. sar -u
/* Report CPU Utilization */
230. sar [ -aA ] [ -o filename ] t [ n ]
/* Provides cumulative reports about system activity. */
231. telnet 13 | grep ':'
/* Get the time on remote Unix machine */
232. uname -a
/* Displays system information */
233. uname -X
/* Displays system information */
234. vmstat 10
/* Displays summary of what the system is doing every 10 seconds */
235. who -b
/* Displays the date of the last system reboot. */
236. ypcat hosts | sort -n -t. +0 -1 +1 -2 +2 -3 +3 -4
/* Take the input of "ypcat hosts" or "cat /etc/inet/hosts" and sort by IP. */

Read more

Translate

Enter your email address:

Buffs ...

Visitors


hits counter
View My StatsCheck Google Page Rank

Add to Google Reader or Homepage

Bookmark and Share

Tags


Powered by WidgetsForFree

Archives