Posts Tagged ‘vi editor’

Recover svn repository

It is normal that svn db get crashed because of permission issue. The following steps help to fix it.

chown svnuser:svngroup /path/to/repos
find /path/to/repos -type d -print0 -exec chmod 2775 {} \;
find /path/to/repos -type f -print0 -exec chmod 0664 {} \;
svnadmin recover /path/to/repos

Be the first to comment - What do you think?  Posted by arun - December 29, 2009 at 22:39

Categories: Linux   Tags: ,

Vi Editor magics

Adding line number to a file with vi

open the file with vi editor

:%!nl

of-course there are other ways to do it with vi :)

Add empty line after every line with vi

:%s/\v(.*\n){1}/&\r

Remove white space at the beginning of a line with vi

:%le

Sorting lines with vi

:sort u

Be the first to comment - What do you think?  Posted by arun - at 09:53

Categories: Linux   Tags: