Difference between revisions of "Linux Tools"

From Healthcare Robotics Wiki
Jump to: navigation, search
(Created page with '= Linux command line tools: find, sed etc. = '''The find command is pretty nifty:''' # find all directories whose name does not contain svn #* find . ! -path "*.svn*" -type d #re…')
 
(Linux command line tools: find, sed etc.)
Line 1: Line 1:
= Linux command line tools: find, sed etc. =
+
= command line tools: find, sed etc. =
 
'''The find command is pretty nifty:'''
 
'''The find command is pretty nifty:'''
 
# find all directories whose name does not contain svn
 
# find all directories whose name does not contain svn

Revision as of 13:43, 17 October 2009

command line tools: find, sed etc.

The find command is pretty nifty:

  1. find all directories whose name does not contain svn
    • find . ! -path "*.svn*" -type d
  2. remove .svn folders, e.g. after copying a directory which is a local copy of a subversion repository
    • rm -rvf `find . -name "*.svn"`
  3. recursively remove all the .pycs
    • alias rmpyc='rm -vf *.pyc; rm -vf `find . -name *.pyc`
  4. remove the pesky .pycs from the repository
    • svn rm `find . -name "*.pyc"`

So is sed:

  1. replace update_path with load_manifest. (-i is doing an in-place replace, I believe)
    • sed -i 's/update_path/load_manifest/' `find . -name "*.py"`