Category Archives: Bash

[Bash] Script for monitoring content of website

Imagine that you are waiting for marks from exam. Lecturer is going to publish them on his website, but you don’t know when. I’ve created following script, because I don’t like pressing F5 for hours ­čÖé You have to provide … Continue reading

Posted in Bash | Tagged , | 1 Comment

[Bash,Linux] Very fast disk shredding/data erasure script

Before I have setted up my encrypted partitions I had to fill them with random sequention of data. I’ve noticed that dd if=/dev/urandom of=DEVICE is very slow. It has 3-4 MB/second on my computer. I wanted to make it faster. … Continue reading

Posted in Bash, Linux | Tagged , , , | 1 Comment

[Linux] Random password generator

Here is a script for generating random alphanumeric passwords: #!/bin/bash # passwords.sh if [ $# != 2 ]; then echo "usage: $0 <length of passwords> <number of passwords> " exit 1 fi tr -cd ‘[:graph:]’ < /dev/urandom | fold -w … Continue reading

Posted in Bash, Linux, Ubuntu | Tagged | Leave a comment

[Bash] How to show information about dd progress / statistics

dd is a great tool for low-level copying and conversion of raw data. It can be also used for data erasure. Unfortunately, it doesn’t show any information about progress of copying. Here is my little, but useful script: 1 2 … Continue reading

Posted in Bash | Tagged , , , | Leave a comment

[Ubuntu] Packages auto-purging script

Here is my script for auto-purging of removed packages (the script deletes remaining configuration files of package) in Ubuntu: #!/bin/sh for i in `dpkg -l | grep ^rc | cut -f 3 -d ‘ ‘` do dpkg -P $i; done#!/bin/sh … Continue reading

Posted in Bash, Ubuntu | Tagged , , , | Leave a comment