CyprusMania

Επίκαιρα, σκέψεις και άρθρα για ενα μικρό νησί

If you’re new or relatively inexperienced to Linux development youll find the stuff below useful:

Backup - an important thing to do if you want to keep your work safe. A usefull little script is the following (thnx to mgillespie from plugcomputer.org)

#!/bin/bash
DIR=/usb/DataBackups/SheevaRootFS/$(date +%Y%m%d)/
mkdir $DIR
dpkg -l |grep ‘^ii’ > $DIR/InstalledPackages.txt
tar cjf /$DIR/backup.tar.bz2 –exclude=/usb –exclude=/lost+found –exclude=/proc –exclude=/dev –exclude=/sys /

which you can save as /etc/cron.monthly/backup.sh
and give it execute permissions by doing

chmod +x /etc/cron.monthly/backup.sh

this works just fine :P

Handling space – another important thing to watch out for, especially for a machine with barely half a gig of memory.

df -h –t=rootfs

will give you usage info (two – in front of t)

while

apt-get clean

and

apt-get autoremove

will help free up space. More tips at the plugwiki of plugcomputer.org

Extracting – most of the stuff for the plug is downloaded in a compressed format.

for .bz2

bunzip {filename}

for .tar.bz2

tar xjvf

for .tar.tgz or .tgz

gunzip < {filename} | tar xvf -

and with .tar its

tar xvf {filename}

filenames above without { }

Useful stuff

nano – a friendly to use file editor

wget - downloads files from websites

cron - event scheduler

install above via apt-get install {name}

Back to Plug Computing

Τελευταία Tweets

Υποστηρικτές

Get Adobe Flash playerPlugin by wpburn.com wordpress themes