Day 12: Cheat-Sheet for Linux,Git-GitHub & Cron.

Day 12: Cheat-Sheet for Linux,Git-GitHub & Cron.

Here I have provided cheat sheet related to linux terminal,Git-GitHub & Cron.

Linux Cheat-Sheet

  • whoami -> prints the username currently logged into the terminal session.

  • ls -> It lists all the files and folders on the disk.

  • ls -l -> It provides a long form of a list.

  • ls a -> It also shows .files which are hidden in the list.

  • ls al -> It shows long form and .files in the list.

  • cd -> Changes directory or moves the path where you are in.

  • mkdir -> This command is used to make folders.

  • touch -> creates an empty file using the command.

  • rmdir -> It deletes a directory or folder from the disk.

  • rm -> It is used to delete files.

  • xdg-open -> It opens the file created.

  • mv -v -> It moves the files from one place to another place.

  • cp -> This command is used for copying files.

  • > -> This command takes the output of the first term and then redirects it to the second term.

  • >>- > This command appends the data.

  • cat -> This command concatenate the file and prints on the standard output of the terminal.

  • echo -> This command is printing the statements.

  • diff -> This command point out the difference between two files.

  • history -> This command provides the history done in the terminal.

  • chown -> This is the command we can use to change who owns a particular file or directory.

  • chmod -> To change the permission of a file or directory, we can use the chmod (change mode).To use chmod to alter permission, we need to tell.


Git & Github Cheat-Sheet

  • git status -> It is used for checking the history of the git repository.

  • git add -> It is used to add a file in the repository means it adds files to the staging area.

  • git commit -m -> It provides us the message for what we write in the repository after completing it.

  • git log -> It is used to see the entire history that all the commits made in history.

  • git stash -> It takes your uncommitted changes (both staged and unstaged) and saves them for later use.

  • git stash pop -> all the saved uncommitted changes bring back to working copy.

  • git stash push -> delete all the things which are in the stash.

  • git rebase -> Rebase is the process of moving or combining a sequence of commits & rebasing is the same as the git merge.

  • git log --oneline -> It shows commits hash history in oneline.

  • git revert -> It is used to record some new commit to reverse the effect of some earlier commit.

  • git clone -> It downloads the folder (from Online) to your local directory.

  • git checkout -> It is used to switch between branches.

  • git branch -> Create a new branch.

  • git branch -D -> Delete a branch.

  • git merge -> Merge specified branch into the current branch.

  • git pull -> Download the content from a remote repository.

  • git cherry-pick -> bring in changes from a specific commit or choose one or commit.


Cron Cheat-Sheet

  • crontab -e : To edit your crontab.

  • crontab -l : To list the current crontab file.

  • crontab -r: To remove your current crontab file.

  • crontab -d : To delete a specific user crontab.

  • crontab -l -u : To list specific user crontab.


Happy Learning :)

Did you find this article valuable?

Support DevOps by becoming a sponsor. Any amount is appreciated!