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

Rohit Rajput
3 min readMar 25, 2023

--

It’s #day12 of the #90daysofdevops Challenge under the guidance of Shubham Londhe Sir.

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 folder on the disk.
  • ls -l -> It provides long form of list.
  • ls a -> It also show .files which are hidden in the list.
  • ls al -> It show long form and .files in the list.
  • cd -> Changes directory or moves the path where you in.
  • mkdir -> This command is used to make folders.
  • touch -> creates an empty files using command.
  • rmdir -> It deletes 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 take output of first term and then redirecting it to second term.
  • >> -> This command append the data.
  • cat -> This command concatenate file and print on the standard output of 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 files or directory.
  • chmod -> To change the permission of a file or directory, we can used the chmod (change mode).To use chmod to alter permission, we need to tell.*

Git & Github Cheat-Sheet

  • git status -> It used for checking history of git repository.
  • git add -> It is used to add file in repository means it add files to staging area.
  • git commit -m -> It provides us the message for what we write in repository after completing it.
  • git log -> It is used to see the entire history that all the commit made in history.
  • git stash -> It takes your umcommited changes (both staged and unstaged) and save them for later use.
  • git stash pop -> all the saved uncommited changes bring back to working copy.
  • git stash push -> delete all the thingd which are in stash.
  • git rebase -> Rebase is the processof moving or combining a sequence of commit & rebasing is 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 download 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.

--

--

Rohit Rajput

|DevOps | Docker | Linux | Jenkins | AWS | Git | Python |Technical Blogger