~$: time find . -type f -name '*.php*' | grep -v /CVS/ | while read FILE_NAME; do cvs log "$FILE_NAME" | grep -i '{search string}' >/dev/null && echo "$FILE_NAME"; done | tee .output
Working with ’screen‘
Working with ’screen‘ lets you run multiple „virtual“ windows in Unix. This becomes very interesting on working with a shell and want to quit the shell connection without killing a running shell command (the command already has to be started in a screen).
Get a list of running, named screen sessions
~$: screen -ls
Create a new named screen session
~$: screen -S [screenname]
Reopen a named screen session, if not available, create it
~$: screen -R [screenname]
Reopen a named screen session
~$: screen -r [screenname]
Reopen a named screen session which is already attached wlsewhere
~$: screen -rx [screenname]
Detach a named screen session
~$: screen -d [screenname]
Kill a named screen session remote
~$: screen -X -S [screenname]
Shortcuts within a session:
Ctrl+a c: Open/Create a new window within a screen session
Ctrl+a a: Switch to the last screen window
Ctrl+a d: Detach the screen session [1]
Ctrl+a k: Kill the screen session [2]
Ctrl+a ESC: Scroll screen up/down with the arrow keys (ESC to quit scroll mode)
Ctrl+a „: Get a window overview of the screen session
Ctrl+a 0-9: Switch to window 0-9 of the screen session
1: Detaching a screen will leave the screen (and all its windows) but let it run in the background
2: Killing a session will leave the screen (and all its windows) and close it.
Flush the APC cache via shell command
~$: php -r "apc_clear_cache();"
Grep a access file and get all ips unique
~$: cat log/access.log | sed 's/ .*//' | sort -u > sorted-ips.tmp
Create a CVS branch (quick note)
Tag with the root tag:
~$: cvs -d /home/cvsroot/ rtag -F Root_CustomTag ModuleName
Create the Branch, starting at the created root tag:
~$: cvs -d /home/cvsroot/ rtag -F -b -B CustomTag ModuleName
