Force fsck on gk802 and other i.MX6 based systems

I had an issue with my root partition and I could not force fsck to be executed with creating /forcefsck.

Here is my /uEnv.txt that handles mounting of /dev/root:

bootargs_video=gpumem=64M video=mxcfb0:dev=hdmi,1280x720M@60,if=RGB24 fbmem=10M
linux=boot/dongle.img
devicetree=boot/dongle.dtb
options=console=ttymxc3,115200n8 root=/dev/mmcblk0p1 ro rootwait

Continue reading “Force fsck on gk802 and other i.MX6 based systems”

How to delete files older than certain number of days

One thing that comes very handy is usage of cron to make scheduled job to delete old files so that you can free up some space on your hard drive

# Delete Apache logs older than 60 days
find /var/log/apache2/ -mtime +60 -exec rm {} \;

With this simple script you will search through Apache logs in folder /var/log/apache2, select the ones with access time older than +60 (60 days) and execute delete with rm command.