Category: Exploring Linux

Interesting Ubuntu Commands

To find the file. Its alterantive is locate command.

find -iname <filename>

i means case-insensitive. It is an optional.

eog a.png

eog means eye of Gnome. It shows image.

pdftk in.pdf cat 1-endE output out.pd
sudo easy_install -U pip

To install pip.

libreoffice file.odt

To open odt file in libreoffice. We can also open docx file.

pandoc -f latex -t docx -o irc.docx irc.tex

It will convert tex file to docx. We can also convert tex file to odt. For it just replace docx with odt.

Git Commands

mkdir invention
cd invention
git init
touch newton.txt
touch a.txt
git add newton.txt
git add a.txt
git rm -f a.txt
git commit -m “first commit”
git remote add red
git remote
git remote -v
git status
git stash
git status
git stash list
git stash apply
git push -u red master
git log
git stash
git revert HEAD~1
git log
git reset –hard HEAD~1
git log
git pull
git checkout -b v1
git checkout -b v2
git checkout v2
git branch (tell all branches in repo)
git branch -m master(rename current branch to master)
git branch -D v2
git merge v1
git diff

git clone