How to change your system date and time
The date command is use to set or change your system date or time
date command to view the the current date and time
Thu Dec 24 19:06:46 IST 2009
How to change your system date and time?
MM = month of the year (01 to ..
Unix hwclock command
hwclock Command to print the current Date and time
Thu 24 Dec 2009 10:29:52 PM IST -1.017992 seconds
How to change the hardware date using hwclock Command
hwclock --set --date='08/4/09 21:08:40' --localtime
The hwclock - Hardware clock command is used to set the hardware date and time. By using the above ..
List directories containing only PNG images
How to search png image or files in directory or folders?
The below command will help you to list only the folder or directories which have png images.
find . -name '*png' -printf '%h\0' | xargs -0 ls -l --hide=*.png | grep -ZB1 ' 0$'
Locate my IP Address
In a terminal window, use the ifconfig command to find the ip address in linux machine.
# /usr/sbin/ifconfig -a
The ifconfig command will help you to find the IPAddress of your linux or unix machine.
Find IP on Mac 10
The below steps will help you to find IP address on Mac X or Macintosh OS version 10.
1. Open the System Preferences application
2. Click the Network icon
3. In the Show: drop down, select Network Status
4. Look for the Built-in Ethernet item, or other applicable network interface
5. The IP address is ..
Read Macintosh IP Address
The following will always work for fixed-IP-address machines (i.e., ethernet or "premium" dialup); they will work for normal "dynamically-assigned IP address" dialup machines only while the connection is running.
(Shortcut) If you are using NCSA Telnet:
1. Choose Show Network Numbers from the Network menu, OR
2. When you type a command requiring ..
Find IP Address on apple phone
You can can the IP address on a iPhone by using the below steps.
1. Click to select Settings from your SpringBoard
2. Click to select Wi-Fi from the Settings menu.
3. Click to select your network. Then next to your network name press the blue circle with the arrow in it.
4. You ..
Unix command to watch cricket
You can watch the cricket score from command line.
wget --quiet -O - http://livechat.rediff.com/sports/score/score.txt | sed -e s/l1/Match/ -e s/l2/BattingTeam/ -e s/message/Score/ -e s/tagline/Batsman/ | grep -v "^interval" | grep -v "^ver"
The above command will read the cricket score from the following text file and will print the result(http://livechat.rediff.com/sports/score/score.txt)
Vi Keyboard Shortcuts
1. Go to the first line
gg or 1 shift g or :0 (zero) Enter
2. Go to the last line.
Shift g or :$ Enter
3. Go to line 8
8 shift g
4. To scroll down one screen
5. To scroll up one screen
Vim Text Editor hide line numbers
To display line numbers of a file in vi text editor, type any one of the following command in vim editor
To turn off line number again enter the same command:
If you need number every time you start vi or vim editor, ..
How to undo and redo in vi editor
Vim offer several functionalities that improve your editing.
1. Copying a whole line
yy or shift y or :ny
where n is the number of line if n is not specified then copy the current line
2. Copying from current position to end of line.
3. Copying 3 lines after the ..
About Email clients
The following are top five amazing piece of cross-platform software from various projects to make your life easy with wide variety of plug-ins / add-ons.
It is an e-mail and news cross-platform client software package by Mozilla Foundation. Thunderbird can manage multiple e-mail, newsgroup and RSS accounts and supports multiple ..
Count process line numbers
Count and number lines of output, useful for counting number of matches
# ps aux | grep [h]ttpd | cat -n
You can also use nl command instead of cat-n ..
Cache videos on proxy
By default the Squid server does not cache video files in the local memory. Consider that you a in a network of 100 users and all access the same video files from youtube.com or any other website, then it is will increase your bandwidth of your internet connection.
The solution to ..
Play Music Files
Play the first track from a audio CD.
# cdplay play 1
Get a free coffee cup holder (Eject the CD ROM tray).
Play a wave file.
# play my_file.wav
Play an mp3 file.
# mpg123 my_file.mp3
Create a wave audio file from an mp3 audio file.