Usefull Unix Commands

  • Find all source files and replace neu where you have alt
    • find . -iname '*.cxx' -exec sed 's/alt/neu/g' -i "{}" ";"
  • Find all source files and search for string suche in this files. Print out filename
    • find . -iname '*.cxx' -exec grep -iH suche "{}" ";"

  • Find compile flags which are active by default
    • gcc -march=native -Q --help=target -v
  • Show all defined preprocessor macros for a specific compiler
    • echo | gcc -E -dM -
    • gcc -dM -E - < /dev/null
    • clang -dM -E -x c /dev/null

  • Monitor CPU usage and Memory
    • top -b -p | tee
    • grep | cut -c 42-46 [CPU usage]
    • grep | cut -c 47-52 [Memory]

  • iostat, vmstat, sar ???

-- FlorianUhlig - 27 Sep 2007
Topic revision: r6 - 17 Sep 2014, FlorianUhlig
 
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding CBM Wiki? Send feedback
Imprint (in German)
Privacy Policy (in German)