Youtube
GIT
001. What is git reset? types of git reset?
002. How to delete the local branch & remote branch in git?
- Local branch: git branch -D <bn>
- Remote branch: git push origin --delete <bn>
003. Difference between git diff and git status?
- git diff:
- git status:
004. What are hooks in git?
- Hooks are special scripts
- it will be execute before or after a certain commands
005. What is the importance .git directory?
- branch
- config
- hooks
- info
- logs
- HEAD
- Objects
006. What are the branches, and differences between remote and local branches?
007. What Branching strategy that you are familiar with?
- Master (or) main
- Development
- Feature/01
- Feature/02
- Creata a PR
- qa
- dev
- pre-pord
- master-main
- tag
008. What is PR (Pull Request)? What's the importance of PR?
009. Which version of git you have used?
- git version
- git version 2.17.1
011. What is git squash?
git merge --squash <bn>
012. Command to list all commits?
git log
git log --oneline
Linux & Shell Script:
001. Command to find empty files in a given directory ?
find . -empty
002. Commands you will use it for configuring ssh connectivity between 2 machines and what files will be present in .ssh folder ?
- First we need to private key & public key to connect
- ssh-keygen
- ~/.ssh
- id_rsa-------id_rsa.pub----know_hosts----authorised_key
003. How to schedule a shell script in unix machine?
Crontab
004. Command to get load average?
top
005. Need to identify IP Address in log file and count IP addresses in log file ?
- git clone git@github.com:Sundupalli/Unix_and_shell-Deekshith.git
- grep -E -o "([0-9]{1,3}[.]){3}[0-9]{1,3}" logfile | sort | uniq -c | sort -nr
006. What is command for checking the running process? how to get PID of process?
- ps
- ps -eaf
007. Command to get whether certain port is listing or not?
netstat -tunlap
008. How to identify the number of parameters that has been sent to shell script?
vi test.shsh test.shsh test.sh 3 4 6vi sh test.sh 3 4 6 7echo "Hello world"echo "The number of parameters $#"ans:- Hello worldThe number of parameters 4
009. Command to delete empty line in a file?
- sed '/^$/d' test.sh
- sed -i '/^$/d' test.sh
010. What is exit status?
echo $?
011. Given machine, how will you identify which machine it is?
uname -a

0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home