home/user/miroroot/
| The Following 8 Users Say Thank You to reinob For This Useful Post: | ||
#!/bin/sh
# Miroroot script to safely free space on rootfs
# by Amr.fayz
if test "`id -u`" -ne 0; then
echo "Error: This script must be run as root!"
echo "Please make sure that the package rootsh from extras is installed"
echo "and execute \"sudo gainroot\" and then \"$0\" in Terminal"
exit 1
fi
echo rootfs before:
df -h /
chmod +x /home/Miroroot
chmod 775 /home/Miroroot
# move root stuff to /home/Miroroot
dirs="usr/share/icons usr/share/nokia-maps usr/share/fonts usr/share/locale usr/share/microb-engine usr/share/tutorial-applet usr/share/cherry usr/local/lib /usr/include usr/lib/locale usr/lib/microb-engine usr/lib/skyhost /usr/lib/browser/plugins usr/lib/pyshared/python2.5 usr/lib/python2.5/site-packages usr/lib/qt4/imports usr/lib/qt4/plugins usr/lib/debug/usr var/lib/dpkg var/lib/apt"
#optional: usr/share/themes var/lib/dpkg
if test -d /home/var/cache/apt; then
# keep existing apt cache
rm -rf /var/cache/apt
ln -s /home/var/cache/apt /var/cache/apt
else
dirs="$dirs var/cache/apt"
fi
(cd / && du -sc $dirs)
for d in $dirs; do
test -L /$d && continue
echo moving /$d
rm -rf /home/Miroroot/$d
mkdir -p /home/Miroroot/$d
cp -a /$d /home/Miroroot/$d/..
mv /$d /$d.old
ln -s /home/Miroroot/$d /$d
rm -rf /$d.old
done
sync
echo "success"
echo "rootfs after (after a reboot the actual free space will be shown):"
df -h /
#!/bin/sh
# N900 script to safely free space on rootfs
# (c) 2010 by Thomas Tanner <maemo@tannerlab.com>
# licensed under GPLv3
# version 0.5 (16. May 2010)
if test "`id -u`" -ne 0; then
echo "Error: This script must be run as root!"
echo "Please make sure that the package rootsh from extras is installed"
echo "and execute \"sudo gainroot\" and then \"$0\" in Terminal"
exit 1
fi
echo rootfs before:
df -h /
# move root stuff to /home
dirs="usr/share/icons usr/share/nokia-maps usr/share/fonts usr/share/locale usr/lib/locale var/lib/apt"
#optional: usr/share/themes var/lib/dpkg
if test -d /home/var/cache/apt; then
# keep existing apt cache
rm -rf /var/cache/apt
ln -s /home/var/cache/apt /var/cache/apt
else
dirs="$dirs var/cache/apt"
fi
(cd / && du -sc $dirs)
for d in $dirs; do
test -L /$d && continue
echo moving /$d
rm -rf /home/$d
mkdir -p /home/$d
cp -a /$d /home/$d/..
mv /$d /$d.old
ln -s /home/$d /$d
rm -rf /$d.old
done
sync
echo "success"
echo "rootfs after (after a reboot the actual free space will be shown):"
df -h /
#!/bin/sh
# N900 script to safely free space on rootfs
# (c) 2010 by Thomas Tanner <maemo@tannerlab.com>
# licensed under GPLv3
# version 0.5 (16. May 2010)
if test "`id -u`" -ne 0; then
echo "Error: This script must be run as root!"
echo "Please make sure that the package rootsh from extras is installed"
echo "and execute \"sudo gainroot\" and then \"$0\" in Terminal"
exit 1
fi
echo rootfs before:
df -h /
# move root stuff to /home
dirs="usr/share/icons usr/share/nokia-maps usr/share/fonts usr/share/locale usr/lib/locale var/lib/apt"
#optional: usr/share/themes var/lib/dpkg
if test -d /home/var/cache/apt; then
# keep existing apt cache
rm -rf /var/cache/apt
ln -s /home/var/cache/apt /var/cache/apt
else
dirs="$dirs var/cache/apt"
fi
(cd / && du -sc $dirs)
for d in $dirs; do
test -L /$d && continue
echo moving /$d
rm -rf /home/$d
mkdir -p /home/$d
cp -a /$d /home/$d/..
mv /$d /$d.old
ln -s /home/$d /$d
rm -rf /$d.old
done
sync
echo "success"
echo "rootfs after (after a reboot the actual free space will be shown):"
df -h /
| The Following User Says Thank You to sifo For This Useful Post: | ||
| The Following 6 Users Say Thank You to reinob For This Useful Post: | ||
... I think he knew his script has bugs & cant find a solution or he's working on a solution to fix the bugs & need some time ... so there is no way except flashing my phone
| The Following 3 Users Say Thank You to J4ZZ For This Useful Post: | ||
:mv /usr/share/icons /home/Miroroot/usr/share/icons ln -s /home/Miroroot/usr/share/icons /usr/share/icons
rm /usr/share/icons mv /home/Miroroot/usr/share/icons /usr/share/icons

| The Following 2 Users Say Thank You to pichlo For This Useful Post: | ||