changing shell prompt in unix

To Change the shell prompt in bourne shell add the following line in the user profile

export PS1="ANY NAME > "

[oracle@tritya oracle]$ export PS1="ANY NAME # "
ANY NAME #

============================================

For C shell , we have to use

set prompt ="ANY NAME >"

find files with specific permission using FIND COMMAND

find command to find files with specific permission



Example : To Find files with 777 permission

[oracle@tritya oracle]$ find . -type f -perm 777 -exec ls -l {} \;
-rwxrwxrwx    1 oracle   dba      19210126 Jun  9 11:35 ./soft/jre-6u6-linux-i586-rpm.bin
[oracle@tritya oracle]$

ls command to show hidden files and hidden characters in file name

LS command to show hidden
files and hidden characters in a file

ls -a command shows hidden
files

ex : ls -a

[oracle@tritya TEST]$ ls
-al

total 248

drwxr-xr-x 2 oracle dba 4096 Jul 23 22:18 .

drwxr-xr-x 40 oracle dba 4096 Jul 23 22:17 ..

-rw-r--r-- 1 oracle dba 238117 Jun 20 10:45 SIP
4 Pager.pdf

-rw-r--r-- 1 oracle dba 0 Jul 23 22:12 .txt

[oracle@tritya TEST]$

ls -lb to show hidden
characters in a file name.

[oracle@tritya TEST]$ ls -lb

total 240

Monitoring swap space in linux / solaris

Monitoring swap space in linux /
solaris


In LINUX Free command displays the
total amount of free and used physical memory and swap space in the
system, as well as the buffers and cache consumed by the kernel.


[oracle@tritya oracle]$ free

total used
free shared buffers cached

Mem: 254932 247104
7828 0 3580 116236

-/+ buffers/cache: 127288
127644

Swap: 803208 16856
786352


In Solaris swap command is used to
monitor the swap space utilization.

Pgrep command in unix

Pgrep command in unix

pgrep
command replaces the combination of the ps , grep , egrep commands.

Example:
check oracle pmon process running in unix server

Checking
with ps and grep commands

creating softlink in unix


Creating soft link



softlink – symbolic link

symboliclink links are used for shortcuts.

Command : ln -s

Example : create a shortcut to backup location in a users home
directory.

[oracle@tritya oracle]$ echo $HOME

/home/oracle

[oracle@tritya backup]$ cd /usr2/oracle/backup/

[oracle@tritya backup]$ pwd

/usr2/oracle/backup

[oracle@tritya backup]$ ls -l

total 11368

drwxr-xr-x 2 oracle dba 4096 May 30 00:05 coldbkp

drwxr-xr-x 2 oracle dba 4096 Jun 20 00:08 exp

Syndicate content
pageTracker._trackPageview();