Bash Dev Cheat Sheet

A Programming › Git cheat sheet in English by tertioptus

Software development reference for Git, Maven and Bash commands.

39,899 views 8,568 downloads 8 Apr 2014 History
4.9 avg · 4 ratings

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

File Permissions

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

Badges

Useful Cheat Sheet Nice Cheat Sheet Good Cheat Sheet Appreciated Cheat Sheet Downloaded from Unusual Locations × 7

Comments (1)

DaveChild 09:01 15 Apr 2014

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.

Reply

Cheatography n. The art of mapping complex subjects into clear, instantly navigable reference guides.