Page 2 of 2

Re: How to find out the space used in save.dat file

Posted: 23 Jun 2015, 04:54
by anandisrocking007
Seva wrote:ext4
like i said before i wanted a pendrive in which there is windows partition but that was not the point the point of asking this question is to know if there is a way if to find out how much data is saved in the persistance file and delete the extra data or rezie the dat file

Re: How to find out the space used in save.dat file

Posted: 23 Jun 2015, 05:00
by Seva
i took the courage and reformatted the flash drive into ext4, and it became a fish in the water, i recommend all users to use linux filesystem when using porteus

Re: How to find out the space used in save.dat file

Posted: 23 Jun 2015, 05:30
by Ed_P
anandisrocking007 wrote:Thanks a lot in telling me that you can only loop the save.dat file in freshor copy2ram mode i thought i was doing something wrong they should add this line in the the porteus tutorial.
Hi anandisrocking007

Glad the script worked for you. :) If you want to run the script as before and in Always Fresh mode use this version:

savedatspaceused.sh

Code: Select all

#!/bin/sh
#  http://forum.porteus.org/viewtopic.php?f=81&t=1941&start=15#p13272
#  http://forum.porteus.org/viewtopic.php?f=117&t=3205&p=25099#p25097

#  mloop requires changes= cheatcodes not used (Always Fresh mode)

# Color definitions
txtbld=$(tput bold)               # Bold
txtred=${txtbld}$(tput setaf 1)   # Red
rst=$(tput sgr0)                  # Reset

function redpswd() {
  echo -e "$1" $txtred  
}

if [ `whoami` != "root" ]; then
    redpswd "Enter root's password"
    su -c "sh $0 $1"
    exit
fi
echo $rst

if [ -a /mnt/live/memory/images/changes ]; then
   SPACEDATDIR=/mnt/live/memory/images/changes 
else
   mloop /mnt/sdb1/porteus/save.dat
   SPACEDATDIR=/mnt/loop
fi
# Change the mloop command to match the name and location of your save.dat file.

echo
echo du -sh
du -sh ${SPACEDATDIR}     # Show the amount used   
echo df -h
df -h  ${SPACEDATDIR}     # Show filesystem summary
echo
du -sh ${SPACEDATDIR}/etc
du -sh ${SPACEDATDIR}/home
du -sh ${SPACEDATDIR}/opt
du -sh ${SPACEDATDIR}/root
du -sh ${SPACEDATDIR}/usr
du -sh ${SPACEDATDIR}/var

if [ -a /mnt/live/memory/images/changes ]; then
   echo  
else
   uloop 
fi
:)
Seva wrote:i took the courage and reformatted the flash drive into ext4, and it became a fish in the water, i recommend all users to use linux filesystem when using porteus
While that works it limits access to files on the flash drive by Windows systems. Probably by Android and Apple systems too. It depends on the environment the flash drive will be used in.

Re: How to find out the space used in save.dat file

Posted: 24 Jun 2015, 14:14
by Bogomips
anandisrocking007 wrote:Overall thanks a lot you guys for the reply now found out that 90% of my save.dat was being eaten by the google chrome cache
If you haven't already done so, magic folder the google chrome cache. That's what I've done with the PaleMoon cache, but to hard disk. 8)

Re: How to find out the space used in save.dat file

Posted: 25 Jun 2015, 05:04
by Ed_P
anandisrocking007 wrote:found out that 90% of my save.dat was being eaten by the google chrome cache
In firefox the cache's size is a variable that the user can set, I have to suspect Chrome has the same option. If so try setting it for 10-20MB.

BTW My save.dat file is 320MB.

Re: [SOLVED] How to find out the space used in save.dat file

Posted: 25 Jun 2015, 07:22
by long123
Thats true but once the the datfile gets full then it would cause problem.

Re: [SOLVED] How to find out the space used in save.dat file

Posted: 25 Jun 2015, 08:44
by Seva
@Ed_P

Yes, if i have only one flash drive for many different devices i should better go with fat32.

Re: [SOLVED] How to find out the space used in save.dat file

Posted: 25 Jun 2015, 12:07
by francois
If the save.dat becomes full, you can mount it and modify it. See:
viewtopic.php?f=46&t=137
http://forum.porteus.org/viewtopic.php?f=81&t=3435

Re: [SOLVED] How to find out the space used in save.dat file

Posted: 26 Jun 2015, 08:08
by long123
Been a while since I used persistence, but if my memory serves me correctly, you need to find out the size of the image in the save,dat file.