Run as root (or using sudo):
rmmod r852; rmmod sdhci_pci; modprobe r852; modprobe sdhci_pci
SD card should be inserted while doing this.
echo $(stuff not to forget) > /dev/memory
Run as root (or using sudo):
rmmod r852; rmmod sdhci_pci; modprobe r852; modprobe sdhci_pci
SD card should be inserted while doing this.
#!/bin/bash KEEP=2 CURRENT=$(uname -r) KERNELCOUNT=$(dpkg -l linux-image-3* | grep ii | wc -l) KERNELS=$(dpkg -l linux-image-3* | grep ii | cut -d' ' -f 3) REMOVECOUNT=$((KERNELCOUNT-KEEP)) REMOVEKERNELS=$(dpkg -l linux-image-3* | grep -v $CURRENT | grep ii | cut -d' ' -f 3 | head -n $REMOVECOUNT) if [ $REMOVECOUNT -le 0 ]; then echo "I was told to keep $KEEP kernel revisions (including current version), but only $KERNELCOUNT kernels are installed. Exiting now." exit 1 fi echo "Currently running on kernel $CURRENT, found $KERNELCOUNT installed kernels:" echo "$KERNELS" echo "I was told to keep $KEEP kernel revisions (including current version), so i will remove $REMOVECOUNT old kernel packages." echo echo "About to purge kernel versions:" echo $REMOVEKERNELS echo apt-get purge $REMOVEKERNELS
Make sure to be running the latest kernel image that is installed on your system! (also, use at your own risk)
#!/bin/bash # # Set the proper filesystem permissions for regular wordpress operation. # Run from wordpress directory USER=www-data GROUP=www-data chown -R root:root . chown $USER:$GROUP .htaccess chown $USER:$GROUP wp-config.php chown -R $USER:$GROUP wp-content
quick & dirty:
#!/bin/bash # # Simple script to backup a wordpress installation. # # That is: # # mysqldump of database schema # mysqldump of database entries # compressed tarball of database backups and wordpress itself # # DATESTAMP=$(date +"%Y%m%d") DBNAME="wordpress" SRCDIR="/path/to/wordpress" TARGET="wordpress-$DATESTAMP" if [ ! -d $TARGET ]; then mkdir $TARGET else echo "Error: working directory exists, bailing out." exit 1 fi echo "Dumping WordPress MySQL DB scheme..." mysqldump --no-data wordpress -u wordpress -p > $TARGET/wordpress-$DATESTAMP.schema.sql echo "Dumping WordPress MySQL DB data..." mysqldump --no-create-info wordpress -u wordpress -p > $TARGET/wordpress-$DATESTAMP.data.sql cp -rp $SRCDIR $TARGET if [ ! -f $TARGET.tar.gz ]; then tar cfvz ./$TARGET.tar.gz $TARGET if [ $? -eq 0 ]; then echo "Archive created successfully, removing working directory." rm -rf $TARGET exit 0 fi else echo "Error: target file exists, bailing out." exit 1 fi