Found this from years back in porteus forum and made it into a module by Joe Arose bigbass
applied to always fresh and changes=EXIT
savework module
https://drive.google.com/file/d/13_3RF6 ... sp=sharing
go to porteus settings manager and paste (for startup commands rc.local) :
touch /home/guest/start_count.txt
touch /tmp/list_recent.txt
What this does is on system bootup it makes a file for a time stamp.
When savecurrent is called It finds all files newer than that file (your changes) only in /home/guest/
it compresses it to a module and leaves it in /home/guest/ though you probably should move it to another drive (wont be saved)
Included is a symbolic link you can type savecurrent and it will execute this script or you can go to /home/guest to execute.
Why is this beneficial? thats where all your desktop changes and important work is. so if you run this script you will have a module of only those exact changes made to your desktop webbrowser configuration basically any settings ect. it doesnt effect anything its just a copy.
Its a backup. lets say your playing around with your system and you know you shouldnt save your changes because you might mess it up. execute this script you have all your work excluding any system changes. So you have this module to save all your work. reboot and activate the module to have your settings back that you changed last session.
Save work
Save work
Always fresh or changes=EXIT
here is another one you can play around with (pulled off forum as well)
These are backup tools which have endless possibilities to be used
Generalized script to show how different options can be used
#!/bin/sh
# folders to check (tweak for your needs):
folders="/etc /home /root /opt /usr /var"
# gather all files in one place:
mkdir /tmp/backup_folder
find $folders | xargs -I {} cp -a --parents {} /tmp/backup_folder
#create the module on your desktop with current date:
dir2xzm /tmp/backup_folder $HOME/Desktop/changes-`date +"%m-%d-%y"`.xzm
rm -r /tmp/backup_folder
For instance you may want to use this is you have your system exactly how you like it. It creates a backup move it to your other drive. Dont need to use timeshift or anything else in the event you lose your changes folder.
How can we modify this to suit our needs?
cd /mnt/live/memory/changes/
find $folders | xargs -I {} cp -a --parents {} /tmp/backup_folder
dir2xzm /tmp/backup_folder /mnt/sda3/mybackup/changes-`date +"%m-%d-%y"`.xzm
rm -r /tmp/backup_folder
that should make a backup of your changes and labeled. so you have an archive of what was saved and when.
configure it to match what changes-commit uses. so its somewhat of an archive what has been put on your system.
over write a file today or a week ago? or messed up your install somehow. have it in one of the archive files. kind of a neat tool
here is another one you can play around with (pulled off forum as well)
These are backup tools which have endless possibilities to be used
Generalized script to show how different options can be used
#!/bin/sh
# folders to check (tweak for your needs):
folders="/etc /home /root /opt /usr /var"
# gather all files in one place:
mkdir /tmp/backup_folder
find $folders | xargs -I {} cp -a --parents {} /tmp/backup_folder
#create the module on your desktop with current date:
dir2xzm /tmp/backup_folder $HOME/Desktop/changes-`date +"%m-%d-%y"`.xzm
rm -r /tmp/backup_folder
For instance you may want to use this is you have your system exactly how you like it. It creates a backup move it to your other drive. Dont need to use timeshift or anything else in the event you lose your changes folder.
How can we modify this to suit our needs?
cd /mnt/live/memory/changes/
find $folders | xargs -I {} cp -a --parents {} /tmp/backup_folder
dir2xzm /tmp/backup_folder /mnt/sda3/mybackup/changes-`date +"%m-%d-%y"`.xzm
rm -r /tmp/backup_folder
that should make a backup of your changes and labeled. so you have an archive of what was saved and when.
configure it to match what changes-commit uses. so its somewhat of an archive what has been put on your system.
over write a file today or a week ago? or messed up your install somehow. have it in one of the archive files. kind of a neat tool
-
- Samurai
- Posts: 157
- Joined: 10 Aug 2016, 05:36
- Distribution: Porteux V-0.1 64 KDE
- Location: Utopia in Tampa, Florida, USA
Save work
Hey dreadbird
I use two scripts:
and make changes to specific items, then run
which then shows the changed files in Konsole.
Since there are always more files than I want I just use the list to pick out the relevant ones.
It makes the resulting module much more specific and usually smaller too.
Thanks for posting,
Vic
I use two scripts:
Code: Select all
#! /bin/bash
touch /root/start_count.txt
touch /tmp/list_recent.txt
Code: Select all
#! /bin/bash
cd /root/
konsole --noclose -e find -newer start_count.txt |tee /tmp/list_recent.txt &
rm /tmp/list_recent.txt
Since there are always more files than I want I just use the list to pick out the relevant ones.
It makes the resulting module much more specific and usually smaller too.
Thanks for posting,
Vic
Save work
Yeah that would be helpful. gives you an idea of what is effected and even what directories you should omit if there are too many files ect.
I find these scripts more helpful than htop or conky. I like to know already in memory whats happening and not installing unnecessary apps (bloat).
I find these scripts more helpful than htop or conky. I like to know already in memory whats happening and not installing unnecessary apps (bloat).
Save work
Here are the scripts. extract files to /home/guest/
https://drive.google.com/file/d/16J9iKG ... sp=sharing
contents
/home/guest/recentfiles
/home/guest/savecurrent
/home/guest/startcount
edit /etc/rc.d/rc.local (so when system boots there is a reference point to search for new files)
touch /home/guest/start_count.txt
touch /tmp/list_recent.txt
savecurrent will save all changes in /home/guest/ since last update of start_count.txt to a module
dated and left in /home/guest/
if you want to start a new reference point run startcount script to create a new start_count.txt file (update time).
I also included recentfiles script. that goes to / directory as root. searches the entire contents of drive
it will search these directories (default changes-exit.conf setup)
/bin /etc /home /lib /lib64 /opt /root /sbin /usr /var
it will display a summary of files (what you can see on the screen) and saves the full list in /tmp/
go to /tmp/list_recent.txt for the full list of new files.
How is this useful?
If youre building or compiling an app you can use recentfiles to see exactly where each file was installed and pull them to make a module. Or you may have accidently moved a file somewhere and this can find it. Gives you an idea of what changed on the system. So before doing some changes you can run startcount script to set the time. Make the changes and then run recentfiles to see what changed.
Theses scripts came from this forum so I just updated them and tweaked to different scenarios. Joe Arose bigbass, vic and others making the original scripts.
quick and dirty to find files (run as su)
this will exclude the cache directories in the search.
https://drive.google.com/file/d/16J9iKG ... sp=sharing
contents
/home/guest/recentfiles
/home/guest/savecurrent
/home/guest/startcount
edit /etc/rc.d/rc.local (so when system boots there is a reference point to search for new files)
touch /home/guest/start_count.txt
touch /tmp/list_recent.txt
savecurrent will save all changes in /home/guest/ since last update of start_count.txt to a module
dated and left in /home/guest/
if you want to start a new reference point run startcount script to create a new start_count.txt file (update time).
I also included recentfiles script. that goes to / directory as root. searches the entire contents of drive
it will search these directories (default changes-exit.conf setup)
/bin /etc /home /lib /lib64 /opt /root /sbin /usr /var
it will display a summary of files (what you can see on the screen) and saves the full list in /tmp/
go to /tmp/list_recent.txt for the full list of new files.
How is this useful?
If youre building or compiling an app you can use recentfiles to see exactly where each file was installed and pull them to make a module. Or you may have accidently moved a file somewhere and this can find it. Gives you an idea of what changed on the system. So before doing some changes you can run startcount script to set the time. Make the changes and then run recentfiles to see what changed.
Theses scripts came from this forum so I just updated them and tweaked to different scenarios. Joe Arose bigbass, vic and others making the original scripts.
quick and dirty to find files (run as su)
Code: Select all
find /bin /etc /home /lib /lib64 /opt /root /sbin /usr /var -type d \( -path /home/guest/.cache -o -path /root/.cache \) -prune -o -mmin -15 -not -type d -print