Thursday, October 27, 2016

Telnet and SSH settings on Linux systems and crontab job setup

Telnet :

To check telnet status 
   $ /sbin/chkconfig  --list telnet

SSH :
$ /sbin/service ssh stop
$ /sbin/service ssh start
$ /sbin/service ssh restart
$ ps -aux | grep ssh
 sshd_config file is allows more settings. 


Crontab :
List the cron jobs in Linux systems
   $ crontab -l
stop emails from cron jobs by redirecting  NULL :
   $  */10 * * * * /usr/local/bin/python2.7      Script_file   > /dev/null 2>&1



Networking

Networking Basics

IP address : 4 classes
subnets 
TCP/IP 
OSI model 
LAN
WAN 
Functions of switch
router 
firewall
access point
DNS
DHCP
SNMP
ARP
NAT
HTTP
FTP
Telnet
RDP
SSH
POP
SMTP
SSL
NetBios

netstat -rn  127.0.0.1

sample guide

Linux core kernel process trace and debugging apps

                           Best Linux commands to validate process or a machine.

cat /proc/self/maps
cat /proc/$PID/status
cat  /proc/dma
cat /proc/devices
cat /proc/interrupts
/sbin/lspci

/sbin/lsusb
cat /proc/net/dev
vmstat
enable 

debugger Tools :strack, ptrace, gdb, 

Compiler Building



                       Building a complainer experience process of Complex Construction is designed for process of making through several steps abstract syntax tree (AST) semantic analysis and high-level optimization coding making IR traces instructing for assembler linking changes.

Cycle we are following to develop complier:
  • Make work with all
  • Make operative for all 
  • Make more efficient and faster
  • Building a library for compalier 

Clearcase Commands


ClearCase is a Software Configuration Management tool (SCM), which is an IBM's rational product.

Clearcase is  version control , build and management, ClearCase manages files, directories and other software objects across Software Development lifecycle. ClearCase has both CLI and GUI based interfaces to work along with vob elements.
cleartool is the ClearCase Command Line Interface(CLI) tool -> "cleartool"

Always create an alias for the cleartool.

Create an alias for cleartool  as ct

Open .bashrc in vim or your favorite text editor.

vi ~/.bashrc   #append the below line and execute

     alias ct='cleartool'

Most used clearcase commands on linux below:
List checked out files in current and sub directories by all in a view.
     ct lsco –r

 List checked out files in current and sub directories by all in a view by you.
       $ ct lsco –r –me

Show all checked out files in current directory and subdirectory by user_name
       $ ct lsco -r -user user_name

List the views current directory
     $ ct lsview

List only file names of checked out files in the current directory
    $ ct lsco –short

Show detailed information of checked out files in the current directory
   $ ct lsco -long
 List all checked out files in the current view
   $ ct lso -cview


Show all the checked out files in the current vob

ct lsco  -avobs


Find out all the check out files by me and check in

This below command checks in all the files checked out by me in current directory and subdirectories recursively

ct ci -nc `ct lsco -me -short  -r`
2.Check out files

Check out single file with comment

ct co –c “user comment for check out” filename


check out multiple files with comment

ct co –c “user comment for check out” filename1 filename2 filename3 filename4    <-- notice space between filename1 filename2 etc..


Check out all files in the current directory

ct co –c “user comment for check out” *.*


Check out only .c files in current directory

ct co –c “user comment for check out” *.c
Check in files

Check in a file with comment

ct ci –c “user comment for check in” filename


Check in file without comment

ct ci –nc  filename
 Check in multiple files in current directory with comment

ct ci –c “user comment for check in” filename1 filename2 filename3
Note:

Use –nc argument for no comment or default comment as of check out.

Undo check out

Undo check out a single fine in current directory

ct unco filename
 Undo check out multiple files

ct unco filename1 filename2 filename3
Undo check out all the files in the current directory

ct unco *.*


Undo check out all the files in the current view

cleartool unco  `cleartool lsco -cview  -short`


To remove private files from view

Remove private files from view, the -rf option is to remove recursively and forcibly.

ct lsprivate | xargs rm –rf


List views

List all the views of current vob

ct lsview


List all the views of a single user

ct lsview |grep username


Directory and files

Check what is the current directory

ct pwv
Check history of a file which is in the vob

ct lshis[tory] filename   <--[tory] means optional lshis is enough
Check history of a file in particular branch

ct lshis[tory] filename | grep branch-name
Check history of a file for a particular user

ct lshis[tory] filename | grep username
Adding directory to VOB

Adding directory to a current view

Step 1:  Check out current directory

ct co –c “user comment for adding directory” . <--notice the .(dot)
Step 2:  Make a directory in current path

ct mkdir directory-name
 Step 3:  Check in directory

ct ci –nc directory-name
Step 4: Check in parent directory

ct ci –nc . <-- notice the .(dot)
Adding a file to vob

Step 1: Check out current directory

ct co –c “user comment for check out” . <--notice the .(dot)
Step 2: Add a file to vob in current directory

ct mkelem  -c “user comment for adding  element ” filename
 note:

multiple files can be added by specifying file names separated by a space

ct mkelem  -c “user comment for adding  element ” filename1 filename2 filename3
Step 3: Check in file

ct ci –nc filename
 Step 4:  Check in current directory

ct ci –nc .      <-- notice the .(dot)


make , set and remove views

Make a new view in current vob

ct mkview –tag view-name
Check the new view in the view list

ct lsview |grep view-name
Set newly created view for use

ct setview view-name
              

Remove particular view on cleasecase :

ct rmview unwanted_view
else
ct rmview –tag unwanted_view


Check config spec of current view
$ ct catcs

Modify or Change config specs of current view
  $  ct edcs

To set config spec to current view from a spec file. 

  $ ct setcs spec1_file.txt

Thursday, October 13, 2016

Frequently used Git commands



: Most frequently used Git commands :

  
Completely New repository checkout
   $ git clone URL_Repo
For particular branch checkout from URL:
   $ git clone -b Branch_Name URL_Repo

Adding a file into Git repository
   $ create a file by using regular Linux command
   $ git add .                                   
   $ git commit -am   " adding file in repo"   .

Push code changes into repository :
     $ git commit -am   " updating file in repo"  .
     $ git push/pull origin Branch_name    

Delete a branch from repository :
    $ cd directory_location
    $ git push origin --delete  Branch_name

Get/checkout the updated changes from repositary :
   $ git pull origin Branch_Name
Switching to different branch for code changes :
   $ git checkout Branch_name
List the staus of the repository  files :
  $ git ls-files --stage
To delete Branch from git repo: 
  $ git push --delete origin  Branch_name

Branch Merging : Branch_x merging to other branch_z or Master
   $ git check out branch_z 
   $ git merge branch_x
   $ git push origin branch_z

   Note : replace branch branch_z  with master for merging into master branch

Git Log information more below:

 git log
 git log -3
 git log -p -2
 git log --stat
 git log --pretty=format:"%h - %an, %ar : %s"
 git log --pretty=format:"%h %s" --graph
 git reflog |  awk '{ print $1 }' | xargs gitk
 git log --oneline --all --graph --decorate  $(git reflog | awk '{print $1}')
 git log --reflog
 git fsck --lost-found
 git log --graph --oneline --decorate
 git log --pretty=format:"%cn committed %h on %cd"
 git log --after="2015-7-1"
 git log --after="2015-6-1" --before="2016-7-4"
 git log --after="yesterday"
 git log --author="srpatcha"
 git log --author="srpatcha\|jhon"
 git log --grep="JRA-224:"
 git log – File_name.cpp
 git log -S"update"
 git log --merges
 git log --no-merges
 git log --oneline | nl -v0 | sed 's/^ \+/&HEAD~/'
 git log - - oneline – 6   
 git log --oneline -20 --decorate
 git log --pretty="%h - %s" --author=srpatcha --since="2008-10-01"
 git log --since="2 weeks ago"
 git log   --since="2016-2-18"   --pretty=format:" %an, %ar : %s"  --all

Thank you for watching post please Like or comment your input review and follow this blog.

"NCBN Nara chandrababu naidu" CEO Deals to grow Andhra Pradesh

CISCO network and andhra pradesh CEO Chandra babu  Microsoft Kaizala for andhra pradesh  Google Wi-fi for andhra pradesh CEO Micro...