Show Menu
Cheatography

Bash Dev Cheat Sheet by

Software development reference for Git, Maven and Bash commands.

Navigation

List all directory contents in long data form
ls -al directory
Find all java files by extension
find directory -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

Current
.
Last
-
Home
~
Parent
..
Root
/

Patter Key

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

Directory Manipu­lation

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

Maven Options

Profile
-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
Number­ed-line text
cat -n filepath
Scrollable number­ed-line text
less -N filepath
Current directory
pwd
Beginning of a file
head
End of a file
tail
Count: character, word and line
wc
Directory hierarchy
tree path

Command Line Control

Delete
Ctrl W
Clear Line
Ctrl U
Start of Line
Ctrl A
End of Line
Ctrl E

File Permis­sions

Git

Create repository
git init
Untrack files
git rm --cached filename
Get remote repository
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
                   
 

Comments

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.

          Related Cheat Sheets

          Linux Every Day Commands Cheat Sheet

          More Cheat Sheets by tertioptus

          No hands!: Os to Browser Driving Cheat Sheet
          Eclipse for Vrappers Keyboard Shortcuts
          Compendium Cheat Sheet