Contents: [slideshow]

The Command Line

Filing System, File and Directory Handling

Processes

BASH: More and Scripts

Installation

More

Practical Session




About this document

Basic Linux Stuff

Example BASH Scripts

Write BASH prog: automate tasks — make life easy!

An example — backups!
#!/bin/bash

# -- the date/time in format: yyyy_mm_dd_hh:mm:ss
DATE=`date +%Y_%m_%d_%H\:%M\:%S`

# -- rsync from sekhmet :
rsync -av -e ssh --delete simonh@sekhmet.dom: /home/simonh/bak_sekhmet

# -- daily snapshot using hard-links :
cp -al /home/simonh/bak_sekhmet /home/simonh/bak_sekhmet_snaps/$DATE


More:


...previousup (conts)next...