Sunday, May 20, 2012

Site Search

Latest News

Creating files in Unix

File Creation:

We can create files in 3 different ways.

  1. touch
  2. cat
  3. vi editor

CAT: With the help of  cat command we can create the files, we can add data to the existing file or create a file but we cannot manipulate the data to the file.

Example: # cat <filename>

# cat _>filename <enter content here without brackets>

Add data to existing file

#cat >>file name

Display the file with line numbers

#cat -n filename

Note: when we a create a file with existing data, then the previous data will be overwritten with the existing.

Touch: With the help of touch command we can create a number of files with zero bytes. It cannot append the data to the existing / creating file.

Ex:  # touch test test1 test2 test3

four files created which are test, test1, test2 and test3 in present directory.

checkout # ls  -l

VI Editor:  This is one of the powerful tool.

It has three types

  1. Insert mode
  2. insert mode
  3. colon mode

Insert Mode:

Key combinations:

Esc  + i To insert the data at the cursor position
Esc + I To insert the data at the starting of the line
Esc + a To insert the data after the cursor position character
Esc + A To open a new line after end of the line
Esc + o To open a new line after the cursor position
Esc + O To open a new line before the cursor position

Cursor Moving commands:

Esc + u Undo
Esc + h To move the cursor to the left
Esc + j To move the cursor to the down
Esc + k To move the cursor to the right
Esc  + l To move the cursor to the up
Esc + w To move the word wise forward
Esc + nw To move the cursor to the nth word
Esc + b To move the word wise backward
Esc + 0 To move to the starting of the line
Esc + $ To move the cursor to the end of the line
Esc + nb To move the ‘n’ words backwards
Shift +ctrl +b To move to the previous page
Shift + ctrl +f To move to the next page
Esc + H To move the cursor starting of the vi screen
Esc + J To join two lines
Esc + G To go the end of the file
Esc + 1G To move the cursor to the starting of the file

Delete commands:

Esc + x To delete the cursor position character
Esc + X To delete the before cursor position character
Esc  + dd To delete a line
Esc + ndd To delete no. of lines
esc + dw to delete a word
Esc + ndw To delete no of words
Esc + d$ To delete the cursor position character end of the line
Esc + d0 To delete the cursor position to the starting of the line
Esc + dG To delete the cursor position character to the end of the file

Copy commands:


Esc + yy To copy a line
Esc + nyy To copy a nth line
Esc + p To paste after the cursor position
Esc + yw To copy a word
Esc + y$ To copy the character from cursor position to the end of the line
Esc + yn or y0 To copy the characters from the cursor position to the beginning of the line
Esc + yg To copy the line from cursor position to the end of the file

Replace commands:

Esc + r To replace a cursor position character
Esc + cw To replace a word
Esc + c$ To replace from cursor position to end of the line
Esc + c0 To replace from cursor position to starting of the line

Colon mode commands:

use it with esc+shift+:

example: esc+shift+:w to save the file

:w To save the file
:q Quit without saving the file
Wq Save and quit
:wq! Save and exit  forcefully
:set nu To set line numbers to the file
:set nonu To remove the line numbers to the file
:20 To move the cursor to the 20th line
:20d To delete the 20th line



SHELL

SHELL: Is a between user and Kernel. Shell is a Command checker.

Kernel: Kernel will control all the system applications.

Types of Shells:

In Unix we have five types of Shells.

default cmd history cli user hostname
Bourn Shell Solaris Sh N N $ No
Korn shell IBM ksh Y N $ no
C shell csh N N % yes
Zshell zsh Y Y % yes
Bourn again shell Linux bash Y Y $ no

#echo $ – it displays the present working shell (except C shell)

#echo $shell – it is for C shell

#echo $SHELL – it displays the default shell

File Systems – Solaris

  • / indicates root directory
  • /bin contains normal user commands
  • /sbin contains system admin commands
  • /var contains log file information
  • /etc contains all configuration files
  • /devices contacins physical devices information
  • /dev contains logical device information which belongs to physical device info
  • /proc contains process id information
  • /opt contains 3rd party packages information
  • /kernel contains kernel module information
  • /home default home directory of a normal user
  • /tmp temporary file information
  • /usr man page command

Unix basic commands

Unix Basic commands

Note:  files system of unix supports case sensitive.

ls: it displays list of directories and files.

ls -f : to justify files and directories (or called as folders)

ls -F: to show only directories

Note:  if there is / symbol then it is a directory and all files without any dot extension are text files.

Example: home/ , Documents/

@ symbol indicates linked files or linked directories.

ls -a : lists hidden files and directories also.

ls -aF : justify hidden files and directories.

ls -i : it displays inode number of files and directories

ls -l : it displays with long list format. It also gives information of no. of files and 7 fields.

  • first part of the first field starts with either l , d or -

l – indicates linked file or directory

d – indicates directory

-   -indicates normal text files

  • second field contains number of links to the files and directories
  • Third field contains user ownership
  • fourth field contains group ownership
  • fifth field shows size of file or directory
  • sixth field shows date and time of the file created or modified
  • Seventh Field shows file or directory name.

pwd command displays the present working directory, the directory which you are currently logged in

cd – change directory

example: if your are in home directory /home or /export/home to go to another directory use cd command

# cd  /

# cd  /Documents

note: you cannot go to hierarchy directory ie: if your pwd is /home ,  and you want to go to /Documents directory, you cannot jump to directory above home dir. First go to root dir (/) and then use command cd  /Documents

 
Move
-

windows-definitions

Top Headline

Microsoft’s ISA Server (Internet Security and Acceleration Server) is the successor to Microsoft’s Proxy Server 2.0 (see proxy server) and is part of Microsoft’s .NET support. ISA Server provides the two basic services of an enterprise firewall and a Web proxy/cache server. ISA Server’s firewall screens all packet-level, circuit-level, and application-level traffic. The Web cache [...]

 

SID – Security Identifier: Security identifiers (SIDs) are numeric values that identify a user or group. For each access control entry (ACE), there exists a SID that identifies the user or group for whom access is allowed, denied, or audited. Well-known security identifiers (special identities) Well-known SID Description Anonymous Logon (S-1-5-7) A user who has [...]

 

DHCP: Dynamic Host configuration Protocol Dynamic: Capable of changing or being changed; in a state of flux, not static. Host: In a network there are Server(centralized administration) and Host (users PC, or network device which is controlled by server) Protocol: Is a set of Rules which are followed. So DHCP assigns Ip address to its [...]

 

How to add tab(link) in Vbulletin?

How to add a new tab in the Navbar at the top of your Forums Page


if you want to add a tab in the navbar link, First  Go to…
Admin CP ->

Styles & Templates ->
Style Manager ->
Edit Templates ->
Navigation/Breadcrumb Templates ->
navbar
Then add the following
<li>

<a class=”navtab” href=”http://www.bitlatech.com”>Home</a>

</li>

Replace the url with of your choice.
I have added it after forum tab.
=============================================================
<div id=”navbar” class=”navbar”>

<ul id=”navtabs” class=”navtabs floatcontainer<vb:if condition=”$show['member'] AND $notifications_total”> notify</vb:if>”>
{vb:raw template_hook.navtab_start}
<vb:if condition=”!$vboptions['selectednavtab'] AND THIS_SCRIPT != ‘search’”>
<li class=”selected”><a class=”navtab” href=”{vb:raw vboptions.forumhome}.php{vb:raw session.sessionurl_q}”>{vb:rawphrase forum}</a>
<li>

<a class=”navtab” href=”http://www.bitlatech.com”>Home</a>

</li>
<ul class=”floatcontainer”>
{vb:raw template_hook.navbar_start}
<vb:if condition=”$show['searchbuttons']“>
<vb:if condition=”$show['member']“>
<li><a href=”search.php?{vb:raw session.sessionurl}do=getnew&amp;contenttype=vBForum_Post”>{vb:rawphrase new_posts_nav}</a></li>
<vb:else />
;;;

;;;;
etc;;
===========================