Day 14 Task: Create a Linux & Git-GitHub Cheat Sheet

Greetings! π I'm Priyadarshi Ranjan, a dedicated DevOps Engineer embarking on an enriching journey. Join me as I delve into the dynamic realms of cloud computing and DevOps through insightful blogs and updates. π οΈ My focus? Harnessing AWS services, optimizing CI/CD pipelines, and mastering infrastructure as code. Whether you're peers, interns, or curious learners, let's thrive together in the vibrant DevOps ecosystem. π Connect with me for engaging discussions, shared insights, and mutual growth opportunities. Let's embrace the learning curve and excel in the dynamic realm of AWS and DevOps technology!
Finally!! π
You have completed the Linux & Git-GitHub hands-on tasks, and I hope you have learned something interesting from it.
Now, let's create an interesting assignment that will not only help you in the future but also benefit the DevOps community!
Task: Create a Cheat Sheet
Letβs make a well-articulated and documented cheat sheet with all the commands you learned so far in Linux and Git-GitHub, along with a brief description of their usage.
Show us your knowledge mixed with your creativity π.
Guidelines:
The cheat sheet should be unique and reflect your understanding.
Include all the important commands you have learned.
Provide a brief description of each command's usage.
Make it visually appealing and easy to understand.
Sample Linux & Git-GitHub Cheat Sheet
Linux Commands
ls: Lists all files and directories in the current directory.Usage:
lsExample:
ls -l(detailed list view)
cd: Changes the current directory.Usage:
cd [directory]Example:
cd /home(moves to the /home directory)
pwd: Prints the working directory.Usage:
pwdExample:
pwd(displays the current directory path)
cp: Copies files or directories.Usage:
cp [source] [destination]Example:
cp file.txt /backup/(copies file.txt to /backup/ directory)
mv: Moves or renames files or directories.Usage:
mv [source] [destination]Example:
mv oldname.txt newname.txt(renames the file)
rm: Removes files or directories.Usage:
rm [file]Example:
rm -r folder(removes folder and its contents)
chmod: Changes the file permissions.Usage:
chmod [permissions] [file]Example:
chmod 755script.sh(sets the permission to rwxr-xr-x)
chown: Changes the file owner.Usage:
chown [owner] [file]Example:
chown user:group file.txt(changes the owner to user and group)
grep: Searches text using patterns.Usage:
grep [pattern] [file]Example:
grep 'error' logfile.txt(searches for the word 'error' in logfile.txt)
find: Searches for files in a directory hierarchy.Usage:
find [directory] -name [filename]Example:
find /home -name "*.txt"(finds all .txt files in /home directory)
Git & GitHub Commands
git init: Initializes a new Git repository.Usage:
git initExample:
git init myproject(creates a new repository in the myproject directory)
git clone: Clones a repository into a new directory.Usage:
git clone [repository URL]Example:
git clonehttps://github.com/user/repo.git(clones the repository)
git status: Displays the state of the working directory and the staging area.Usage:
git statusExample:
git status(shows which changes have been staged, which haven't, and files that arenβt being tracked by Git)
git add: Adds file contents to the staging area.Usage:
git add [file]Example:
git add .(adds all changes to the staging area)
git commit: Records changes to the repository.Usage:
git commit -m "[message]"Example:
git commit -m "Initial commit"(commits the changes with a message)
git push: Updates the remote repository with the committed changes.Usage:
git push [remote] [branch]Example:
git push origin main(pushes the changes to the main branch of the remote repository)
git pull: Fetches and merges changes from the remote repository to the local repository.Usage:
git pull [remote] [branch]Example:
git pull origin main(fetches and merges changes from the main branch of the remote repository)
git branch: Lists, creates, or deletes branches.Usage:
git branchExample:
git branch new-feature(creates a new branch called new-feature)
git checkout: Switches branches or restores working tree files.Usage:
git checkout [branch]Example:
git checkout main(switches to the main branch)
git merge: Merges two or more development histories together.Usage:
git merge [branch]Example:
git merge new-feature(merges new-feature branch into the current branch)
Conclusion
Creating this cheat sheet not only solidifies your understanding but also provides a handy reference for future projects. Use this task to showcase your knowledge and creativity, making something both informative and visually appealing
Connect and Follow Me on Socials




