Linux
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
Ctrl f
5. To scroll up one screen
Ctrl ..
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
:set number
:set nu
To turn off line number again enter the same command:
:set nu!
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.
y$
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.
1.Mozilla Thunderbird
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).
# eject
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.
..
Simple shortcut commands
<Ctrl><Alt><F1>
Switch to the first text terminal. Under Linux you can have several (6 in standard setup) terminals opened at the same time.
<Ctrl><Alt><Fn> (n=1..6)
Switch to the nth text terminal.
tty
Print the name of the terminal in which you are typing this command.
<Ctrl><Alt><F7>
Switch to the first GUI terminal (if X-windows is running on ..
Untar or Decompress files and Folders
How to uncompress or extract the compressed files or zip files?
You can use the below commands to uncompress or decompress the files and folders using the below linux command.
# tar -zxvf filename.tar.gz
(=tape archiver) Untar a tarred and compressed tarball (*.tar.gz or *.tgz) that you downloaded from the Internet.
..
Locate the busy driver
When you are trying to unmount a device drive, but it keep saying that your system or drive is busy.
# lsof +D /mnt/drive-name
This will return the command and process ID of any tasks that is currently accessing the /mnt/drive-name directory.
By finding the Process-ID you can either ..