Category: Bash / Terminal / Scripts


every once and a while you would like to save some disk space… by re-encoding your *.jpg and *.mp4 from your mobile phone… you can do this with this pretty nice windows program (shiiit) linux alternatives: anyway it’s […]


apt-get update; apt-get install p7zip-full; # install software vim ./; # create a new bash script file # insert this: #!/bin/bash for arc in *.7z do    7z x -y "$arc" done :wq # write and quit vim chmod u+x […]


This is a basic but yet very powerful way to stress-test your site. WordPress, Blogspot but also TYPO3 without HipHop and PHP7 (check out this benchmark) seem to be quiet good targets for this attack. I basically managed to bring […]


Hardware Assembly: (i think 512MByte should be enough, 1GByte probably pretty good) Software Installation: including squid-proxy and web advertisement-filtering in the next part: OpenVPN 🙂 Thanks man! Amazing tutorials! by Related Links:


ip address add dev eth0 will add ip to your eth0 / LAN, in case you need to access more subnets than the default DHCP-subnet. please also checkout this amazingly cool youtube video tutorial on how to build […]


from recording a webradio i had a load of those files, which were kind of tricky to delete. The trick is to use find instead of rm. find -name "*————— – —————*"; #dry run ./————— – ————— (20).aac ./————— – […]


you can either use wget to download the webpage or use Firefox Ctrl+S (Save As) wget; # download webpage # become root sudo bash; # or su; apt-get update; apt-get install lynx; lynx -dump "website.html" | awk ‚/http/{print $2}’| […]


sudo bash; # become root #create directories mkdir -p /backup/mysql # backup every database manually separately mysqldump -u root DATABASE_NAME > /backup/DATABASE_NAME.sql; # backup every database separately automatically (easier to restore) for db in $(mysql -u root -e ’show databases‘ […]


apt-cache showpkg evolution-common Package: evolution-common Versions: 3.12.9~git20141130.241663-1 (/var/lib/apt/lists/ftp.uni-erlangen.de_debian_dists_jessie_main_binary-i386_Packages) (/var/lib/dpkg/status) Description Language: File: /var/lib/apt/lists/ftp.uni-erlangen.de_debian_dists_jessie_main_binary-i386_Packages MD5: 63a9c80d6efb5e50b74aae7ebcc8bf5c Description Language: en File: /var/lib/apt/lists/ftp.uni-erlangen.de_debian_dists_jessie_main_i18n_Translation-en MD5: 63a9c80d6efb5e50b74aae7ebcc8bf5c Reverse Depends: gnome-panel,evolution-common 3.4.3 evolution,evolution-common 2.91 evolution,evolution-common 3.12.9~git20141130.241663-1 almanah,evolution-common 3.6.0 Dependencies: 3.12.9~git20141130.241663-1 – dconf-gsettings-backend (16 (null)) gsettings-backend (0 […]


UNTESTED! #!/bin/bash DBUSR=UserNameThatIsAllowedToUseMYSQLDUMP DBNAME=NameOfDatabaseOfProject echo "========= backup database – you will have to provide the password manually" mysqldump -u "$DBUSR" -p "$DBNAME" > /var/www/vhosts/"$PROJECT"/httpdocs/"$DBNAME".sql gzip /var/www/vhosts/"$PROJECT"/httpdocs/"$DBNAME".sql; echo "============== backing up "$PROJECT tar fcvvvz /var/www/vhosts/"$PROJECT"/backups/"$PROJECT"_files_backup_$(date +%Y-%m-%d-%M).tar.gz /var/www/vhosts/"$PROJECT"/httpdocs # remove […]


this kind of content-search might take a while, because it searches EVERY file. # qnap (busybox) tested/approved su; # become root cd /; # go to root directory # start search in all files find . -type f | xargs […]