SoftwareQuestions
Database design guidelines: here (pdf)
Question: What's revision control?
Answer: See RevisionControl.
Question: Is there an easy way to manage multiple terminal sessions?
Answer: See UsingScreen.
Question: How do I find/replace a string in multiple text files?
Answer:
- perl -pi -e 's/find/replace/g' *.txt
- For a directory tree: find . -name '*.txt' | xargs perl -pi -e 's/find/replace/g'
Question: How do I change file extensions for a bunch of files (ex: aa.html to aa.shtml)?
Answer: In the directory: for i in *; do j=`echo $i | cut -d . -f 1`; mv $i "$j[new ext]"
On linux (but not OS X) the command "rename" is also useful, as in "rename .html .shtml *.html"
Question: How do I count the number of files in a directory tree (use "-maxdepth 1" to limit directory depth)?
Answer: In the directory: find * -type f | wc -l