rokoder

Tag: unix

Finding version of Ubuntu via command line

by on Feb.26, 2012, under System

> lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 11.10
Release:	11.10
Codename:	oneiric
Leave a Comment :, , , , more...

Git with vimdiff

by on Feb.18, 2012, under System

Some people are really a big fan of ‘vim’ and so they also use ‘vimdiff’ over the default ‘diff’ utility. ‘vimdiff’ shows you a side by side diff which is very easy to read (shown in the image below).

vimdiff in action

vimdiff in action

Now if you are using ‘git’ and you run ‘git diff’ you will get a diff which is not very human readable. Thats where ‘vimdiff’ comes.

> git diff
diff --git a/todo-java-app/pom.xml b/todo-java-app/pom.xml
index 96aebba..6b9af3f 100644
--- a/todo-java-app/pom.xml
+++ b/todo-java-app/pom.xml
@@ -1,5 +1,6 @@

+testing
     4.0.0
     com.rokoder
     todo-java-app
@@ -48,4 +49,4 @@
             5.1.18

-
\ No newline at end of file
+
>
>

‘git’ supports ‘vimdiff’ as a diff tool. Run the below command to change the diff tool to ‘vimdiff’.
(continue reading…)

Leave a Comment :, , , , , , more...

Faster way to extract file name

by on Dec.29, 2011, under Programming

Working with unix shell and no way you wont end up extracting file names from paths. Well there is a usual way to do it.

>basename /my/big/long/path/to/a/little/bitty/file
file

Here is another way:

(continue reading…)

1 Comment :, , , , , , more...

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Blogroll

A few highly recommended websites...

Archives

All entries, chronologically...