Day-12 : Linux & Git-GitHub Cheatsheet!

Day-12 : Linux & Git-GitHub Cheatsheet!

Linux Commands Cheatsheet:

  1. pwd: Print Working Directory - Displays the current directory path.Example: pwd
  2. ls: List - Lists files and directories in the current directory.Example: ls -l
  3. cd: Change Directory - Moves to the specified directory.Example: cd /path/to/directory
  4. mkdir: Make Directory - Creates a new directory.Example: mkdir new_directory
  5. touch: Create a new file or update the access and modification times of an existing file.Example: touch new_file.txt
  6. rm: Remove - Deletes files or directories.Example: rm file.txt
  7. grep: Global Regular Expression Print - Searches for patterns in files.Example: grep "pattern" file.txt
  8. chmod: Change Mode - Changes the permissions of files or directories.Example: chmod 755 file.txt
  9. chown: Change Owner - Changes the owner of files or directories.Example: chown user:group file.txt
  10. ps: Process Status - Displays information about running processes.Example: ps aux
  11. cat: Concatenate - Displays the contents of a file.Example: cat file.txt
  12. cp: Copy - Copies files or directories.Example: cp file.txt new_directory/
  13. mv: Move - Moves or renames files or directories.Example: mv file.txt new_location/file.txt
  14. find: Find - Searches for files and directories.Example: find /path/to/search -name "filename"
  15. awk: Pattern Scanning and Processing Language - Processes text files.Example: awk '{print $1}' file.txt
  16. sed: Stream Editor - Edits text files.Example: sed 's/old_text/new_text/g' file.txt
  17. tar: Tape Archive - Creates or extracts files from a tarball.Example: tar -czvf archive.tar.gz directory/

Git-GitHub Commands Cheatsheet:

  1. git init: Initialize a new Git repository.Example: git init
  2. git clone: Clone a repository into a new directory.Example: git clone https://github.com/username/repository.git
  3. git add: Add file contents to the index.Example: git add file.txt
  4. git commit: Record changes to the repository.Example: git commit -m "Commit message"
  5. git status: Show the working tree status.Example: git status
  6. git branch: List, create, or delete branches.Example: git branch
  7. git checkout: Switch branches or restore working tree files.Example: git checkout branch_name
  8. git merge: Join two or more development histories together.Example: git merge branch_name
  9. git push: Update remote refs along with associated objects.Example: git push origin branch_name
  10. git pull: Fetch from and integrate with another repository or a local branch.Example: git pull origin branch_name
  11. git log: Show commit logs.Example: git log
  12. git diff: Show changes between commits, commit and working tree, etc.Example: git diff commit_hash

I have added a cheatsheet for your reference, Make sure every cheatsheet must be UNIQUE

Utsav Bayaskar

DevOps Engineer at Capgemini

1 年

Happy Learning :)

回复

要查看或添加评论,请登录

Utsav Bayaskar的更多文章

社区洞察

其他会员也浏览了