rsync Example #1
Description:
Copy recursive files from source_dir to /destination on server.
Keep files that are newer on server and update destination files in-place.
Code:
$ rsync --inplace -urv --rsh=ssh source_dir user@server:/destination
diff Example #1
Description:
Create a patch file with diff.
Code:
$ diff -up old_src/foo.c new_src/foo.c> src.patch
jar Example #1
Description:
Create a JAVA archive with jar. The file classes.list contains all
class files.
Code:
$ find /yourpath -name "*.class"> classes.list
$ jar cmf Foo.mf Foo.jar @classes.list *.properties
e2fsck Example #1
Description:
Run e2fsck with a progress bar.
Code:
$ e2fsck -C 0 -v -t /dev/yourdevice
bash Example #1
Description:
Rename all files in the rc directories to deactivate it on
startup or shutdown.
Code:
$ cd /etc
$ for f in `find rc* -name "*foo*"`; do mv ${f%%/*}/_${f##*/}; done
kbuild-helper - Shell script to simplify the kernel build under Debian
Description:
This script is a good example for using a lot of bash internal functions
to simplify and standardize the kernel building under Debian GNU/Linux.
apt-dater - terminal-based remote package update manager
Description:
apt-dater provides a ncurses frontend to manage package updats on a large number
of remote hosts using SSH. At the moment on the client site are only Debian based
hosts running apt are supported.
mail2mysql - mail to mysql
Description:
This C - program does get a email from /dev/stdin and insert
it to a mysql table. The program can verify the email per pgp/gpg.
i3dglload - Innovation3d file loader
Description:
i3dglload is a simple Innovation3d file loader. It renders
the object with the OpenGL interface. The view is from a camera
which can pan, zoom, and rotate around the object. It is mainly
for game designers which uses Innovation3d.
FALLING TOWER in JAVA - aka xjump
Description:
FALLING TOWER (xjump) was a classical X11 game by Tatsuya Kudoh.
I have recoded it in JAVA as an JAVA game.
validator.php - Validate your code on W3C automatically
Description:
If you write dynamic web pages in PHP and you want to
validate the sgml code, but you don't want to check page for page
of conformity, then you can include validator.php in your PHP code.
Disk usage (du)
Description:
Disk usage (du) like output (sorted by file size)
Code:
$ pipe dir 'p1 /nohead/notrail/size=allo/widt=file=200 | -
sort /key=(POS:200,siz:10,dec,unsi,ASC) sys$pipe sys$output
WSA0X.COM
Description:
Select a display (global WSA device) by name
Code:
$! WSA0X.COM
$ SET NoOn
$ WSAPOS = 1
$ WSAMAX = 150
$ DEVS = 0
$!
$ WRITE SYS$OUTPUT "Select your DISPLAY device:"
$ GETWSA:
$ WSANAME = ""
$! Get all displays
$ DEFINE SYS$OUTPUT NL:
$ PIPE SHOW DEV WSA'WSAPOS' | SEARCH SYS$PIPE WSA'WSAPOS' -
| (READ SYS$PIPE WSALINE ; DEFINE/JOB WSALINE &WSALINE)
$ WSANAME = F$ELEMENT(0, ":", F$TRNLNM("WSALINE"))
$ IF WSANAME .EQS. "WSA"'WSAPOS
$ THEN
$ PIPE SHOW DISP WSA'WSAPOS' /val="ORT" | search sys$pipe ORT | -
(READ SYS$PIPE LOCATION ; DEFINE/JOB LOCATION &LOCATION)
$ LOC = F$ELEMENT(1, "=", F$TRNLNM("LOCATION"))
$ IF LOC .NES. "="
$ THEN
$ DEASSIGN SYS$OUTPUT
$ WRITE SYS$OUTPUT ""'WSAPOS + ": WSA" + ""'WSAPOS + " - " + LOC
$ DEVS = DEVS + 1
$ ENDIF
$ DEASS/JOB LOCATION
$ ENDIF
$ WSAPOS = WSAPOS + 1
$ DEASS/JOB WSALINE
$ IF WSAPOS .LT. WSAMAX THEN GOTO GETWSA
$ IF DEVS .GT. 0
$ THEN
$ DEASS SYS$OUTPUT
$ READ/PROMPT="Your choice: " SYS$COMMAND CHOICE
$ DEF/JOB DECW$DISPLAY WSA'CHOICE
$ def decw$display wsa'choice
$ ENDIF