Subversion Cheatsheet

Tags:

Add to working copy svn add
Backup to hot copy hot-backup.py /opt/svn /opt/svn-backup
Change log view svn log file:///opt/svn/scripts/firewall/firewall-new
Checkout svn checkout file:///opt/svn/profile
Commit changes svn commit --message "Your log message"
Copy to working copy svn copy
Create respository svnadmin create --fs-type fsfs /opt/svn
Delete from working copy svn delete
Diff changes svn diff
Initial Import svn import . file:///opt/svn --message "Initial import"
Merging to current directory svn merge
Move file in working copy svn move
Remote Checkout svn checkout svn+ssh://@/opt/svn/
Revert all changes svn revert
Review changes svn status
Review commit log svn log
Update working copy svn update (may overwrite changes)
View file svn cat file:///opt/svn/profile/.profile
View repository tree svnlook tree /opt/svn

Solaris and Sun/Oracle cheatsheet

Tags:

Init levels

0 Go into boot prompt (OK).
1 Put the system in system administrator mode. All file systems are mounted. Only a small set of essential kernel processes are left running. This mode is for administrative tasks such as installing optional utility packages. All files are accessible and no users are logged in on the system.
2 Put the system in multi-user mode. All multi-user environment terminal processes and daemons are spawned. This state is commonly referred to as the multi-user state.
3 Start the remote file sharing processes and dae mons. Mount and advertise remote resources. Run level 3 extends multi-user mode and is known as the remote-file-sharing state.
4 Is available to be defined as an alternative multi-user environment configuration. It is not necessary for system operation and is usually not used.
5 Shut the machine down so that it is safe to remove the power. Have the machine remove power, if possible.
6 Stop the operating system and reboot to the state defined by the initdefault entry in /etc/inittab.
reboot -- -x
Reboot and issue boot -x (boot to non-cluster mode) at boot prompt.
`reboot -- -xs`
Reboot and issue `boot -xs` (single user, non-cluster mode) at boot prompt.
`reboot -- -r`
Reboot and issue boot -r (reconfigure) at boot prompt.

Continue reading Solaris and Sun/Oracle cheatsheet...

Shell cheatsheet

Tags:

The following may not apply to all shells.

Job control

  • Resume job after suspend: ctrl-q
  • Resume job in background: bg <job number>
  • Resume job in foreground: fg <job number>
  • Suspend delay (suspend at stdin): ctrl-y
  • Suspend: ctrl-z

Command line laziness

  • Recall history line 66: !66
  • Recall last command: !!
  • Recall last arguement from last command: !$
  • Recall all arguements from last command: !*
  • Clear shell history: history -c
  • Delete shell history entry: history -d <number>
  • Rename rpmnew files:

    find -type f -name "*.rpmnew" | sed 's/\(^.*\)\(\.rpmnew\)$/mv -f \1\2 \1/' |sh
    
  • Search and replace files in place:

    find /path -name "*.*" -exec | perl -pi -e 's///g' {} \;
    
  • vi cli editing: set -o vi Now esc to enter command mode where vi keys work. Pressing enter returns to normal mode.