Tuesday, April 21, 2015

Useful commands/keyboard shortcuts for Devs

Using a Mac pc as a developer can be quite challenging, as it has it's own isolated commands unlike Linux based computers. Following are some useful shortcuts/ terminal commands that comes in handy as a developer.
Values included in <> are to be replaced with your run time values.

1. Extract a jar file :   jar tf  <jar-file>

2. Search for a string in all files :   grep -r <carbon_event_processing_version> *

3. Find the process running in a specific port (port 80 in this case) :  sudo lsof -i :80

4.Printscreen command in Mac :  ctrl+shift + 4

5. In terminal (vi) go to end of a file : G

6. In terminal (vi) go to the top of a file : G1 

7. Zip content in Mac :  zip -r -X ClaimsApprovalTask3.zip ClaimsApprovalTask2 
 ( Remember to add option -X ,else your zipped file will contain mac resource files( _MACOSX/.ds store))

8.After traversing the pathof a file/folder  through terminal , open it in finder (Mac specific) : open .

 


No comments:

Post a Comment