Posts

Showing posts from January, 2013

VIM editor commands and examples - Linux

Image
VIM An Advanced Text Editor:- => Newer Virsion of VI, the standard Unix text editor => gvim :         Graphical Version of vim ADVANTAGES OF VIM :- SPEED            : Do more with fewer keystrokes Simplicity        : No dependence on mouse/GUI Availability      : Included with most Unix-like OSes DISADVANTAGES :- Difficulty         : Stteper learning curve than simpler editors Three Main Mode :- Command Mode     : Move cursor, cut/paste text, change mode Insert Mode             : Modify text Ex Mode                  : Save, quit, etc ' Esc ' key is used to exits current mode. ' EscEsc ' always returns to command mode. => vim abc.txt         : can edit the text file if existing or not => vim /etc/passwd => vim /tmp/file INSERT MODE :-     i     : begins insert end of line     A  : Append to end of line     I    : Insert at beginning of line      (small)    o    insert new a line (below of current lin

Browsing linux filesystem

Browsing The Filesystem Some Important Directories Red hat root (main)directory: / Home Directories:                /root                        ( home directory of root only )                                              /home/username       ( for all users ) User Excecution :                 /bin, /usr/bin, /usr/local/bin system Excecution :              /sbin, /user/sbin, /usr/local/sbin Other Mountpoints :              /media, /mnt Configuration :                      /etc Temporary files :                   /tmp Kernels and Bootloader       /boot Server Data :                       /var, /sys System Information :            /proc, /sys Shared Libraries :                /lib, /usr/lib, /usr/local/lib => pwd                                 to see current working directory Note :   1) Names may be up to 255 characters                 2) All characters are valid, except the forward-slash                 3) Names are case-sensitive =&

Basic linux commands

Image
==>>>    Command                                                 - date                           : to see the date and time                 - date 112503451982 : month,date,hour,minut,year                                         - cal                             : to see the calendar                 - cal 2010                    : to see the calendar of 2010                 - cal 5 2010                 : display the calendar of May 2010                                                          - clear                          : to clear the screen                 - ls                               : to see the list of dir and file                                    - useradd vishal           : to create user with name 'vishal'                 - passwd vishal            : to set & also change password of user 'vishal'                 - passwd                      : to root only                 - passwd -d vishal