Backup script for Linux

Oct/11
22

I wanted to create a simple backup solution for config files and scripts on my home server and came up with this. This script will backup all files that are listed in a space separated variable. It will tar and compress the files into an archive and store it where you find appropriate. It will also rotate the backups so that only a selected number of backups will be saved. [...]

Chmod recursively

Oct/11
21

When I rip CD’s to flac I put the files on my server in order to be able use them with my squeezebox. For the squeezebox server to be able to read the files I need to chmod and chown the files and direcories in a proper way, so I made this simple script to do it for me. 1 2 3 4 5 #!/bin/bash   chown -R user:group /path/to/files/to/change/* [...]

Statistics for vsftp

Oct/11
21

I needed a task in order to learn how to use arrays in bash and I ended up doing this. A script to group uploads and downloads by users in an xferlog and present them in a list. But first a word of warning. This script is a resource killer! It does a pretty (not good, only pretty) job but it’s slow and cumbersome for the computer to crunch through [...]

Check for files in a directory

Oct/11
21

This is a shell script to check if there are any files in a certain directory that have been added (or changed rather) in the last n:th minutes. I use it to monitor an upload directory on a ftp server. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 #!/bin/bash   # This script checks for files/folders that have been [...]

Start a sopcast stream from a url

Oct/11
21

This is a shell script to start a sopcast stream from a url. Personally I have associated the sop protocol with this script in Firefox and it is working very well. Now I just have to click a sop-url and the stream will start in vlc. If I quit vlc the stream will be killed. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 [...]

© kernelpanic.nu. Powered by Wordpress, dressed by ToThePoint.