Linux Command For DBA

Enable SSH in Linux: -
#chkconfig --list sshd
#chkconfig --levels 2345 sshd on

to find a file in a directory:-
$ find (directory_path) -name (file_name)

to find a value in a vi editor:-
in vi editor [esc] & :/(find_value)

to delete a value in a vi editor:-
in vi editor [esc] & :%s /delete_value

to delete contents in a file:-
in vi editor [esc] & :/%d

to replace a value in a vi editor:-
in vi editor [esc] & :%s /search_value/replace_value

to see the size of a file (or) directory:-
$du -csh (file or directory name)

to count the files & directories in a directory:-
$ls -l |wc -l

to count the files in a directory:-
$find . -type f |wc -l

to count the directries in a directory:-
$find . -type d |wc -l

to see the file-system in linux:-
$file /sbin/init
(or)
$getconf LONG_BIT

How to mount Windows shared folder in Linux: -
$mount.cifs //IPAddrss/share_folder_name/ /mnt -o user=username


Thank you 
Osama Mustafa

Comments

Popular posts from this blog

Connection refused; No available router to destination On Weblogic Node Manager Log

How to change SGA in Oracle Rac

SGA_MAX_SIZE & SGA_TARGET / MEMORY_TARGET & MEMORY_MAX_TARGET