Show Menu

Bash Dev Cheat Sheet by tertioptus

Software development reference for Git, Maven and Bash commands.

Navigation

List all directory contents in long data form
ls -al direc­tory
Find all java files by extension
find direc­tory -name pattern
Find all indexed paths in updatedb
locate option pattern
Finds source, binary and manual files:
whereis filename
Shows full path of command
which -a filename

Maven Clean Lifecycle

pre-clean
clean
post-clean

Maven Default Lifecycle

validate
initialize
genera­te-­sources
proces­s-s­ources
genera­te-­res­ources
proces­s-r­eso­urces
compile
proces­s-c­lasses
genera­te-­tes­t-s­ources
proces­s-t­est­-re­sources
test-c­ompile
proces­s-t­est­-cl­asses
test
prepar­e-p­ackage
package
pre-in­teg­rat­ion­-test
integr­ati­on-test
post-i­nte­gra­tio­n-test
verify
install
deploy
 

Directory Key

Curr­ent.
Last-
Home~
Parent..
Root/

Patter Key

Any string*
Any charac­ter?
Any of character set[...]
Negate!
Or|

Directory Manipulation

Change direct­ory
cd
Remove direct­ory
rmdir
Move direct­ory
mv source desti­nation
Remove all files recurs­ively
rm -rf
Copy directory or file
cp source desti­nation
Create shortcut
ln -s path alias
Create direct­ory
mkdir directory name
Create empty file or update time stamp.
touch filename

Maven Options

Prof­ile-P profile name
Skip unit tests-Dskip­Tests
Skip integr­ation test-DskipITs
Skip all tests-Dmave­n.t­est.sk­ip=true

Maven Site Lifecycle

pre-site
site
post-site
site-d­eploy
 

Display

Variable string
echo string
Numb­ere­d-line text
cat -n filepath
Scro­llable number­ed-line text
less -N filepath
Current direct­ory
pwd
Begi­nning of a file
head
End of a file
tail
Count: character, word and line
wc
Dire­ctory hierar­chy
tree path

Command Line Control

DeleteCtrl W
Clear LineCtrl U
Start of LineCtrl A
End of LineCtrl E

File Permissions

Git

Create reposi­tory
git init
Untrack files
git rm --cached filename
Get remote reposi­tory
git clone url
Stage all files
git add --all
Push commits to remote repo
git push alias branch
Pull changes from remote repo
git pull alias branch
Show log
git log
 

Share This Cheat Sheet!

Favourited by 4 Members:

DeeJRoth McCloud dpnsw tertioptus

Comments

DaveChild DaveChild, 09:01 15 Apr 14

There was an issue with gif images on the PDFs, which I've now resolved. The new PDF is now being created properly for this cheat sheet.

Add a Comment

Your Comment

Please enter your name.

    Please enter your email address

      Please enter your Comment.