Showing posts with label Command. Show all posts
Showing posts with label Command. Show all posts

Sunday, April 20, 2014

Useful linux command line

1. Find content in multiple files
grep -rnw "content" 
where : r is recursive, n is line number , w is the whole word.

grep -lir "content"
will show file names which contains the content.

2. Mysql command line
login: mysql -h localhost -u myname -pmypass mydb

3. Replace string in subfolder multiple files
find ./ -type f -exec sed -i -e 's/apple/orange/g' {} \;

Friday, April 4, 2014

How to use svn command line in Ubuntu

- How to add multiple files in directory to svn:    
      svn add --force * --auto-props --parents --depth infinity -q
  or
svn status | grep '?' | sed 's/^.* /svn add /' | bash