Select Menu

Ads

Random Posts

Powered By Blogger
Powered By Blogger

Blog Archive

Search This Blog

Thirupal Boreddy. Powered by Blogger.

My Blog List

Followers

Lorem 1

Technology

Circle Gallery

Shooting

Racing

News

Lorem 4

» » » » » UNIX Commands(rcp,awk,paste,egrep)

1>rcp -r mqprod/* gemsdevp01:/mon01/app/oracle/admin/mqprod/.
2>rcp gems28:/u23/oradata/r201dev1/gl_ifh03.dbf /u07/oradata/glintst/.


3>awk '{print $2}' file_name
--->for getting the 2nd field from the file

4>cat file_name |cut -d "/" -f4 >new_file
--->it cuts the file as per the delimiter /

5>paste -d "\0" file1 file2 >file3
--->pastes the two files without the any gap between them.

6>egrep '\.log|\.dbf' file_name
--->for getting the lines containing the specified format.

7>egrep '\.log|\.dbf' file_name |cut f2 -d "'"
--->cut the specified lines as per the delimiter ' from the given file

chmod g+w file_name (or) dir_name --->to chang the any file permission to the group or any other
permission --- r,w,x
users owner,group,others
+ for giving the permission
- for removing the permission

10>sort according to the required field number
sort +3n -t:
Where 3 is field number in the file_name.

sort -t/ +4 ----------to sort the file contents from $th field onwards.

11)paste -d " " file1 file2 ---- to map the two files.
paste -d"\0" rcp_mqtp_mqtt.sh test
NLS_LANG=AMERICAN_AMERICA.UTF8

12)cat source* |cut -d"/" -f7

13)date +%j-%y

14)cat cold_db.sh |awk -F/ '{print $2"/.snapshot/ivrp/"$3"/"$4"/"$5}'

15) du -sk ---> to find the total space occupied by internal directories & files in a directory.

16) set disk_usage = `df -k . | tail -1 | cut -f8 -d" " | cut -b1,2`

df -kl|tr -s ' '|cut -f6 -d ' '

About Oracle DBA World

WePress Theme is officially developed by Templatezy Team. We published High quality Blogger Templates with Awesome Design for blogspot lovers.The very first Blogger Templates Company where you will find Responsive Design Templates.
«
Next
Newer Post
»
Previous
Older Post

No comments

Leave a Reply

QUERY FOR CPU USAGE

select  a.target_name as HOST, to_char(a.rollup_timestamp,' dd-Mon-yy::hh24:mi') as "DAY-TIME", sum(c.cpu_count) as ...