dump-session: too many error messages

Please reproduce your error on a second machine before posting, and check the error by running without saved changes or extra modules (See FAQ No. 13, "How to report a bug"). For unstable Porteus versions (alpha, beta, rc) please use the relevant thread in our "Development" section.
rych
Warlord
Warlord
Posts: 787
Joined: 04 Jan 2014, 04:27
Distribution: Porteus 5.0 x64 OpenBox
Location: NZ
Contact:

dump-session: too many error messages

Post#1 by rych » 28 Jun 2024, 09:43

Could someone fix this script that is part of Porteus 5.01, please:

Code: Select all

root@porteus:~# /opt/porteus-scripts/dump-session
syncing what's left in buffers
saving changes to /mnt/sdb3//porteus - this may take a while...
find: ‘bin’: No such file or directory
find: ‘lib’: No such file or directory
find: ‘lib64’: No such file or directory
find: ‘opt’: No such file or directory
find: ‘sbin’: No such file or directory
sed: -e expression #4, char 1: unknown command: `_'
sed: -e expression #4, char 1: unknown command: `_'
...maybe 100 or so identical lines skipped...
sed: -e expression #4, char 1: unknown command: `_'
find: ‘bin’: No such file or directory
find: ‘lib’: No such file or directory
find: ‘lib64’: No such file or directory
find: ‘opt’: No such file or directory
find: ‘sbin’: No such file or directory
session saved
Or perhaps I've made some mistakes editing the /etc/changes-exit.conf:

Code: Select all

# Folders listed in this config file will be saved during reboot and shutdown when 'changes=EXIT:' cheatcode is used.
# Folders starting with '!' are omitted. This is useful if you want to save whole folder except for particular subfolder(s).
# An example is inclued in default config below: Porteus will save whole /var folder except for /var/run and /var/tmp subfolders.
# Other example: "!/home/guest/.mozilla/firefox/c3pp43bg.default/Cache" will skip saving of Firefox caches from guest account.
# Thanks to Rava for suggesting implementation of '!' exceptions.

/bin
/etc
#/home
/lib
/lib64
/opt
/root
/sbin
/usr
#Let's try to exclude var completely and see what happens
!/var
#!/var/run
#!/var/tmp
#!/var/cache
!/root/.cache
#!/root/.local/share/TelegramDesktop/tdata/emoji
#!/root/.local/share/TelegramDesktop/tdata/user_data/cache
#!/root/.local/share/TelegramDesktop/tdata/user_data/media_cache
#!/root/.local/share/TelegramDesktop/tupdates
!/root/.pfilesearch
!/root/.mozilla/firefox/FirefoxProfile
!/root/.waterfox/WaterfoxProfile
!/root/.config/google-chrome
!/root/.config/chromium-ungoogled
!/.cache
!/root/.Mathematica
!/var/lib/sbopkg/SBo
For the reference the /opt/porteus-scripts/dump-session script is copied below as it comes with Porteus:

Code: Select all

#!/bin/bash
# Save live session ...
# Script takes action only when 'changes=EXIT' cheatcode is used.
# Author: fanthom <[email protected]>
# Modifications proposed by: abelM -- forum.porteus.org

# Check if 'changes=EXIT' cheatcode is active:
test -f /mnt/live/tmp/changes-exit || { echo "'changes=EXIT:' cheatcode is not active - exiting..."; exit; }

## Variables:
DEST="$(cat /mnt/live/tmp/changes-exit)"; NAME="$(basename $DEST)"
MNAME=/mnt/live/memory/images/changes   ; INAME=/mnt/live/memory/images
CHNEXIT_CONF=/etc/changes-exit.conf     ; EXCL=/tmp/save.excl.tmp
SFILES=/tmp/save.sfiles.tmp             ; UPDATE=/tmp/save.update.tmp

# Fix folder names and make `egrep' interpret wildcards
fixdir() { sed -e 's_\._\\._g' -e 's_?_._g' -e 's_*_.*_g' -e 's@..@^@'; }

# Fix whiteout names so `egrep' doesn't interpret special characters as regex
fixwh() { sed -e 's_\._\\._g' -e 's_?_\\?_g' -e 's_+_\\+_g' -e '_*_\\*_g' -e 's_\$_\\$_g' -e 's_\[_\\[_g' -e 's_(_\\(_g'  -e 's_\&_\\&_g' -e 's@^@^@'; }

# Folders to save: argument for `find'
FOLDERS="$(grep ^/ $CHNEXIT_CONF | sed s/.//)"

# Folders to exclude: argument for `egrep'
grep ^!/ $CHNEXIT_CONF | fixdir > $EXCL 

## Save session:
echo "syncing what's left in buffers"
sync

# Remount aufs with 'udba=notify' flag: 
mount -o remount,udba=notify / 
echo "saving changes to $DEST - this may take a while..."
cd /mnt/live/memory/changes

# Handle filenames with spaces.
IFS="
"

# Remove deleted files and non matching whiteouts
for y in $(find $FOLDERS -name ".wh.*"); do 
  f="$(echo $y | sed 's@\.wh\.@@g')" 
  test -e "$MNAME/$f" && rm -rf "$MNAME/$f"; 
  test -e "$INAME/"*"/$f" || { echo "$y" | fixwh >> $EXCL; test -e "$MNAME/$y" && rm -f "$MNAME/$y"; }
done

# Copy new and modified files -- skip excluded whiteouts and folders
{ test -s "$EXCL" && find $FOLDERS -not -type d | egrep -vf $EXCL || find $FOLDERS -not -type d; } > $SFILES
cp -uafv --parents $(cat $SFILES) $MNAME > $UPDATE

# Remove conflicting whiteouts 
for y in $(find $MNAME -name ".wh.*"); do 
	f="$(echo $y | sed -e 's^$MNAME^^g' -e 's^\.wh\.^^g')"; 
	test -e "$f" && rm "$y"; 
done

# Reset IFS to default 
unset IFS
# Remount aufs with 'udba=none' flag: 
mount -o remount,udba=none / 
echo "session saved"

User avatar
Ed_P
Contributor
Contributor
Posts: 8956
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

dump-session: too many error messages

Post#2 by Ed_P » 29 Jun 2024, 06:11

rych wrote:
28 Jun 2024, 09:43
Could someone fix this script that is part of Porteus 5.01, please:
I assume you are referring to the
rych wrote:
28 Jun 2024, 09:43
sed: -e expression #4, char 1: unknown command: `_'
errors? Can you find a couple of the `_' lines in your dump-session file, or in your /mnt/live/memory/changes folder and display them?

Added in 26 minutes 8 seconds:
There are 3 sed commands in dump-session:

Code: Select all

sed -e 's_\._\\._g' -e 's_?_._g' -e 's_*_.*_g' -e 's@..@^@';

Code: Select all

sed -e 's_\._\\._g' -e 's_?_\\?_g' -e 's_+_\\+_g' -e '_*_\\*_g' -e 's_\$_\\$_g' -e 's_\[_\\[_g' -e 's_(_\\(_g'  -e 's_\&_\\&_g' -e 's@^@^@';
and

Code: Select all

sed s/.//
Both expression #4s look fine.

Added in 5 minutes 11 seconds:
rych wrote:
28 Jun 2024, 09:43
Or perhaps I've made some mistakes editing the /etc/changes-exit.conf:
Easy way to find out. Remove your changes and try the dump-session again.

This is my changes-exit.conf file.

Code: Select all

# Folders listed in this config file will be saved during reboot and shutdown when 'changes=EXIT:' cheatcode is used.
# Folders starting with '!' are omitted. This is useful if you want to save whole folder except for particular subfolder(s).
# An example is included in default config below: Porteus will save whole /var folder except for /var/run and /var/tmp subfolders.
# Other example: "!/home/guest/.mozilla/firefox/c3pp43bg.default/Cache" will skip saving of Firefox caches from guest account.
# Thanks to Rava for suggesting implementation of '!' exceptions in /etc/changes-exit.conf.

/bin
/etc
/home
/lib
/lib64
/opt
/root
/sbin
/usr
/var
!/var/run
!/var/tmp
!/root/.local/share/Trash/
!/root/.cache/thumbnails/normal
!/home/guest/.local/share/Trash/
!/home/guest/.cache/thumbnails/normal
!/home/guest/.java/deployment/cache/6.0/
!/home/guest/.mozilla/firefox/Crash?Reports/pending/
!/home/guest/.cache/mozilla/firefox/cuiho3hm.default-release-2/thumbnails/
!/home/guest/.cache/mozilla/firefox/cuiho3hm.default-release-2/cache2/
!/home/guest/.mozilla/firefox/cuiho3hm.default-release-2/datareporting/archived

rych
Warlord
Warlord
Posts: 787
Joined: 04 Jan 2014, 04:27
Distribution: Porteus 5.0 x64 OpenBox
Location: NZ
Contact:

dump-session: too many error messages

Post#3 by rych » 29 Jun 2024, 09:45

Ed_P, thanks for your interest to this problem. The /opt/porteus-scripts/dump-session script prints suspicious messages, same in both Porteus/X.

It works with /etc/changes-exit.conf, so let's run it on 2 simplified versions of that file:
1.

Code: Select all

root@porteus:~# cat /etc/changes-exit.conf 
/bin
root@porteus:~# /opt/porteus-scripts/dump-session
syncing what's left in buffers
saving changes to /mnt/sdb3//porteus - this may take a while...
find: ‘bin’: No such file or directory
find: ‘bin’: No such file or directory
cp: missing destination file operand after '/mnt/live/memory/images/changes'
Try 'cp --help' for more information.
session saved
This probably means it found nothing to copy, but I'd rather not see those error/warning messages

2. Adding another line we start seeing the cryptic sed: -e expression #4, char 1: unknown command: `_'

Code: Select all

root@porteus:~# cat /etc/changes-exit.conf 
/bin
/etc
root@porteus:~# /opt/porteus-scripts/dump-session
syncing what's left in buffers
saving changes to /mnt/sdb3//porteus - this may take a while...
find: ‘bin’: No such file or directory
sed: -e expression #4, char 1: unknown command: `_'
find: ‘bin’: No such file or directory
session saved
That is now more disturbing: was everything successfully saved?! If it was, isn't it too many messages to ignore. In fact, the number of those sed: -e expression #4, char 1: unknown command: `_' lines becomes so large that it floods my own script output which calls /opt/porteus-scripts/dump-session.

Are the authors of that script still around I wonder? Are we even using it right? How to update it and make it cleaner perhaps?

User avatar
Ed_P
Contributor
Contributor
Posts: 8956
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

dump-session: too many error messages

Post#4 by Ed_P » 29 Jun 2024, 15:01

Bare in mind that while I've always used changes=EXIT when I boot in update mode I have rarely used the dump-session script. To save a session, I reboot. :)

I suspect this might be the cause of many of the error msgs.
rych wrote:
28 Jun 2024, 09:43
#Let's try to exclude var completely and see what happens
!/var
To run a script and not see the output direct it's output to null.

Code: Select all

> /dev/null
rych wrote:
29 Jun 2024, 09:45
That is now more disturbing: was everything successfully saved?!
Easy enough to find out, use the saved session file as a module in an AF boot. :)

If you're only interested in specific files/folders in your /mnt/live/memory/changes folder you could create a script to back just them up without using dump-session.

User avatar
ncmprhnsbl
DEV Team
DEV Team
Posts: 4290
Joined: 20 Mar 2012, 03:42
Distribution: v5.0-64bit
Location: australia
Contact:

dump-session: too many error messages

Post#5 by ncmprhnsbl » 30 Jun 2024, 02:52

hmm, perhaps a section that parses /etc/changes-exit.conf, checks for nonexistent dirs in /mnt/live/memory/images/changes and appends them to /tmp/save.excl.tmp
i'll mess about with it when i get a chance..
Forum Rules : https://forum.porteus.org/viewtopic.php?f=35&t=44

User avatar
Ed_P
Contributor
Contributor
Posts: 8956
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

dump-session: too many error messages

Post#6 by Ed_P » 30 Jun 2024, 06:08

ncmprhnsbl wrote:
30 Jun 2024, 02:52
hmm, perhaps a section that parses /etc/changes-exit.conf, checks for nonexistent dirs in /mnt/live/memory/images/changes
Or maybe a separate script to edit a user's customized changes-exit.conf file? :hmmm: Might be easier/quicker to create. :) It could be run without impacting the running of the dump-session app. And could work for changes=EXIT reboots that use the changes-exit.conf file also. :happy62:

Added in 1 day 10 hours 39 minutes 40 seconds:
rych wrote:
29 Jun 2024, 09:45
That is now more disturbing: was everything successfully saved?!
A way to check might be in this thread: SAVE.DAT, XZM & MLOOP

And an alternative to dump-session that you might prefer would be this link: changes smart backup (Post by rych #88328)

rych
Warlord
Warlord
Posts: 787
Joined: 04 Jan 2014, 04:27
Distribution: Porteus 5.0 x64 OpenBox
Location: NZ
Contact:

dump-session: too many error messages

Post#7 by rych » 03 Jul 2024, 12:45

Ed_P wrote:
01 Jul 2024, 16:48
an alternative to dump-session that you might prefer would be this link: changes smart backup (Post by rych #88328)
You're referring me to my own post 2 years ago. This time I really need to commit the current session's /mnt/live/memory/changes to the /changes on the USB, then so that I can save the combined, most up-to-date state.

If you want to help, could you make a very simple two-line /etc/changes-exit.conf:
/bin
/etc
and run the commands below, perhaps your output will be different to mine:

Code: Select all

root@porteus:~# cat /etc/changes-exit.conf 
/bin
/etc
root@porteus:~# /opt/porteus-scripts/dump-session
syncing what's left in buffers
saving changes to /mnt/sdb3//porteus - this may take a while...
find: ‘bin’: No such file or directory
sed: -e expression #4, char 1: unknown command: `_'
find: ‘bin’: No such file or directory
session saved

rych
Warlord
Warlord
Posts: 787
Joined: 04 Jan 2014, 04:27
Distribution: Porteus 5.0 x64 OpenBox
Location: NZ
Contact:

dump-session: too many error messages

Post#8 by rych » 03 Jul 2024, 13:01

ncmprhnsbl, is this very script, dump-session, also used at the shutdown with EXIT: cheatcode? Which place calls it? I'd like to see, for another point too: I've noticed that PorteuX commits changes much faster and proceeds to shutdown instantaneously while Porteus waits for 3 seconds or something.

As for "fixing" dump-session -- you're probably the only one or one of the very few people who could still do it, I for example don't understand the code at all :)

User avatar
ncmprhnsbl
DEV Team
DEV Team
Posts: 4290
Joined: 20 Mar 2012, 03:42
Distribution: v5.0-64bit
Location: australia
Contact:

dump-session: too many error messages

Post#9 by ncmprhnsbl » 03 Jul 2024, 13:48

rych wrote:
03 Jul 2024, 13:01
ncmprhnsbl, is this very script, dump-session, also used at the shutdown with EXIT: cheatcode? Which place calls it?
no, that happens in initrd, (/mnt/live/cleanup) which by the looks of it just 2>/dev/null s the find commands to quieten any noise, which is all it is, actual function not really affected. it doesn't seem to have such elaborate sedding as dump-session.. not sure what to make of that..
anyway, here's something to try for dump-session:
change line 23:

Code: Select all

FOLDERS="$(grep ^/ $CHNEXIT_CONF | sed s/.//)"
to

Code: Select all

FOLDERS="$(for x in $(grep ^/ $CHNEXIT_CONF | sed s/.//); do test -e $MNAME/$x && echo $x; done)"
this should filter out any nonexistent folders.
Forum Rules : https://forum.porteus.org/viewtopic.php?f=35&t=44

User avatar
Ed_P
Contributor
Contributor
Posts: 8956
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

dump-session: too many error messages

Post#10 by Ed_P » 03 Jul 2024, 18:54

rych wrote:
03 Jul 2024, 12:45
If you want to help, could you make a very simple two-line /etc/changes-exit.conf:

and run the commands below, perhaps your output will be different to mine:
Yup, my output is similar.

Code: Select all

guest@porteus:~$ su
Password: 
root@porteus:/home/guest# cat /etc/changes-exit.conf
# Folders listed in this config file will be saved during reboot and shutdown when 'changes=EXIT:' cheatcode is used.
# Folders starting with '!' are omitted. This is useful if you want to save whole folder except for particular subfolder(s).
# An example is included in default config below: Porteus will save whole /var folder except for /var/run and /var/tmp subfolders.
# Other example: "!/home/guest/.mozilla/firefox/c3pp43bg.default/Cache" will skip saving of Firefox caches from guest account.
# Thanks to Rava for suggesting implementation of '!' exceptions in /etc/changes-exit.conf.

/bin
/etc

root@porteus:/home/guest# /opt/porteus-scripts/dump-session
syncing what's left in buffers
saving changes to /mnt/nvme0n1p7//porteus5.0/changes/50save.dat - this may take a while...
find: ‘bin’: No such file or directory
sed: -e expression #4, char 1: unknown command: `_'
sed: -e expression #4, char 1: unknown command: `_'
sed: -e expression #4, char 1: unknown command: `_'
find: ‘bin’: No such file or directory
session saved
root@porteus:/home/guest# 
Save this script as executable in /guest/home as dump-session and run it with ./dump-session.

Code: Select all

#!/bin/bash

# Save changes as an xzm module 

MOD=mychanges-$(date +%Y%m%d)
SYSTM=

# http://forum.porteus.org/viewtopic.php?f=53&t=3801&start=30#p28472
BOOT=`grep -A1 "Porteus data found in:" /var/log/porteus-livedbg|tail -n1|sed 's^//^/^g'`
DRV=${BOOT:5:4}
if [ "$DRV" == "isol" ]; then
   ISOBOOT=`grep -A1 "//porteus" /var/log/porteus-livedbg|tail -n2|sed 's^//^/^g'`
   SYSTM="${ISOBOOT:10:10}/"
   DRV=${ISOBOOT:5:4}
fi
if [ "$DRV" == "nvme" ]; then
   SYSTM="${ISOBOOT:15:10}/"
   DRV=${ISOBOOT:5:9}
fi

CHANGES=/mnt/$DRV/$SYSTM$TO/$MOD
#echo BOOT: $BOOT & echo ISOBOOT: $ISOBOOT & echo DRV: $DRV & echo SYSTM: $SYSTM & echo CHANGES: $CHANGES & read

if [ `whoami` != "root" ]; then
   echo toor | sudo -S  echo "******"
   sudo sh $0 $1 $2
   exit
fi
echo -e "\033[0m"; echo -en "\033]0;Save Session\a" 

if [ -d /tmp/mod/ ]; then
   rm -rf /tmp/mod
fi
mkdir -p /tmp/mod

# Choose whatever modified folders/files you want copied.  
#ls -l /mnt/live/memory/changes

cp -a --parents  /mnt/live/memory/changes/etc/*                   /tmp/mod/ 
cp -a --parents  /mnt/live/memory/changes/.....                   /tmp/mod/
# Choose as many folders as you want.

du -h    /tmp/mod/   | grep "[0-9]M"
echo
echo Changed files copied. Press Enter to create the module, Ctrl+C to exit.
echo

dir2xzm  /tmp/mod /tmp/$MOD.xzm   &&   rm -rf /tmp/mod

echo Copy the /tmp/$MOD.xzm to your system, Ctrl+C to exit.

echo Finished!
#rm      /tmp/$MOD.xzm
sleep 5
Modify to fit whatever /etc, /bin folders you want. :)

Added in 49 minutes 21 seconds:
BTW In my Cinnamon system I don't have a /bin changes folder.

Code: Select all

root@porteus:/home/guest# ls -l /mnt/live/memory/changes
total 0
drwxr-xr-x  2 root root  60 Jul  3 10:25 dev/
drwxr-xr-x  6 root root 240 Jul  3 14:47 etc/
drwxr-xr-x  3 root root  60 Jul  3 10:25 home/
drwxr-xr-x  3 root root  60 Jul  3 10:25 lib/
drwxr-xr-x 10 root root 220 Jul  3 10:25 mnt/
drwx------ 11 root root 260 Jul  3 15:41 root/
drwxr-xr-x  3 root root  80 Jul  3 10:25 run/
drwxrwxrwt  6 root root 180 Jul  3 14:42 tmp/
drwxr-xr-x  4 root root  80 Jul  3 10:25 usr/
drwxr-xr-x  8 root root 160 Jul  3 14:25 var/
root@porteus:/home/guest# 
Added in 28 minutes 28 seconds:
rych wrote:
03 Jul 2024, 13:01
while Porteus waits for 3 seconds or something.
The wait allows the user to abort the saving of the session's changes that they don't want to save. Like the ones I've been making in this update boot session. :happy62:
Last edited by Ed_P on 03 Jul 2024, 23:47, edited 1 time in total.

rych
Warlord
Warlord
Posts: 787
Joined: 04 Jan 2014, 04:27
Distribution: Porteus 5.0 x64 OpenBox
Location: NZ
Contact:

dump-session: too many error messages

Post#11 by rych » 04 Jul 2024, 15:20

ncmprhnsbl wrote:
03 Jul 2024, 13:48
here's something to try for dump-session:
change line 23:
ncmprhnsbl wrote:
03 Jul 2024, 13:48
this should filter out any nonexistent folders.
Maybe it did something, but the output flooded with the same error messages. Thanks anyway. I'll take a look at how it's done in the initrd, and at Ed_P's script above, and will try to decide on an alternative to dump-session. Under a better name too :) We're not dumping the session, we're committing it rather, by merging it into /changes.

User avatar
Ed_P
Contributor
Contributor
Posts: 8956
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

dump-session: too many error messages

Post#12 by Ed_P » 04 Jul 2024, 17:42

rych wrote:
04 Jul 2024, 15:20
the output flooded with the same error messages
Yea, gotta figure out what's triggering them and edit/delete them. Probably a stupid cache file.

User avatar
ncmprhnsbl
DEV Team
DEV Team
Posts: 4290
Joined: 20 Mar 2012, 03:42
Distribution: v5.0-64bit
Location: australia
Contact:

dump-session: too many error messages

Post#13 by ncmprhnsbl » 05 Jul 2024, 04:50

rych wrote:
04 Jul 2024, 15:20
Maybe it did something, but the output flooded with the same error messages.
including the 'find' ones?
i'll set up a test environment to see if i can reproduce to debug..
Forum Rules : https://forum.porteus.org/viewtopic.php?f=35&t=44

User avatar
Ed_P
Contributor
Contributor
Posts: 8956
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

dump-session: too many error messages

Post#14 by Ed_P » 05 Jul 2024, 06:42

In dump-session I added this "echo $f " after line 43. My changes-exit.conf is the same as I posted previously.
This is some of what I got:

Code: Select all

guest@porteus:~$ su
Password: 
root@porteus:/home/guest# ./dump-session
syncing what's left in buffers
saving changes to /mnt/nvme0n1p7//porteus5.0/changes/50save.dat - this may take a while...
find: ‘bin’: No such file or directory
find: ‘lib’: No such file or directory
find: ‘lib64’: No such file or directory
find: ‘opt’: No such file or directory
find: ‘sbin’: No such file or directory
etc/cups/ppd/HP-Officejet-Pro-8600.ppd
sed: -e expression #4, char 1: unknown command: `_'
etc/cups/ppd/HP-Officejet-Pro-8600.ppd.O
sed: -e expression #4, char 1: unknown command: `_'
etc/X11/xorg.conf
sed: -e expression #4, char 1: unknown command: `_'
home/guest/.cache/mozilla/firefox/cuiho3hm.default-release-2/startupCache/scriptCache.bin
sed: -e expression #4, char 1: unknown command: `_'
home/guest/.cache/mozilla/firefox/cuiho3hm.default-release-2/startupCache/scriptCache-child.bin
sed: -e expression #4, char 1: unknown command: `_'
home/guest/.cache/thumbnails/large/fe4080f03f306f6b0b6bcf36d068b4a9.png
sed: -e expression #4, char 1: unknown command: `_'
home/guest/.cache/thumbnails/large/a1470fb2e6ec76b0c058dee4ad40202d.png
sed: -e expression #4, char 1: unknown command: `_'

sed: -e expression #4, char 1: unknown command: `_'
home/guest/.local/share/gvfs-metadata/home-f2b1f5e3.log
sed: -e expression #4, char 1: unknown command: `_'
home/guest/.local/share/gvfs-metadata/home-d37328e7.log
sed: -e expression #4, char 1: unknown command: `_'
home/guest/.local/share/gvfs-metadata/home-54b7b04e.log
sed: -e expression #4, char 1: unknown command: `_'
home/guest/.local/share/gvfs-metadata/home-0bcf9f21.log
sed: -e expression #4, char 1: unknown command: `_'
home/guest/.local/share/gvfs-metadata/uuid-FEA6A472A6A42CD9-021a3403.log
sed: -e expression #4, char 1: unknown command: `_'
home/guest/.local/share/gvfs-metadata/home-fbb6112f.log
sed: -e expression #4, char 1: unknown command: `_'

home/guest/.mozilla/firefox/cuiho3hm.default-release-2/storage/permanent/chrome/idb/3870112724rsegmnoittet-es.files/368
sed: -e expression #4, char 1: unknown command: `_'
home/guest/.mozilla/firefox/cuiho3hm.default-release-2/storage/permanent/chrome/idb/3870112724rsegmnoittet-es.files/366
sed: -e expression #4, char 1: unknown command: `_'
home/guest/.mozilla/firefox/cuiho3hm.default-release-2/storage/permanent/chrome/idb/3870112724rsegmnoittet-es.files/390
sed: -e expression #4, char 1: unknown command: `_'
home/guest/.mozilla/firefox/cuiho3hm.default-release-2/storage/permanent/chrome/idb/3870112724rsegmnoittet-es.files/388
sed: -e expression #4, char 1: unknown command: `_'

home/guest/.mozilla/firefox/cuiho3hm.default-release-2/bookmarkbackups/bookmarks-2024-03-25_526_6WzO4nd0-3xTYhyyNOCwrQ==.jsonlz4
sed: -e expression #4, char 1: unknown command: `_'
home/guest/.mozilla/firefox/cuiho3hm.default-release-2/bookmarkbackups/bookmarks-2024-04-11_528_6ptIzujQ1l1tnfmz0exmBg==.jsonlz4
sed: -e expression #4, char 1: unknown command: `_'
home/guest/.mozilla/firefox/cuiho3hm.default-release-2/bookmarkbackups/bookmarks-2024-04-18_530_LClEwWl3QpuejjpfxalAjw==.jsonlz4
sed: -e expression #4, char 1: unknown command: `_'
home/guest/.mozilla/firefox/cuiho3hm.default-release-2/bookmarkbackups/bookmarks-2024-04-19_531_jVIuQuCYgzmqNWtUQMFDCg==.jsonlz4
sed: -e expression #4, char 1: unknown command: `_'

var/spool/cups/d00057-001
sed: -e expression #4, char 1: unknown command: `_'
var/spool/cups/d00058-001
sed: -e expression #4, char 1: unknown command: `_'
var/cache/cups/HP-Officejet-Pro-8600.data
sed: -e expression #4, char 1: unknown command: `_'
find: ‘bin’: No such file or directory
find: ‘lib’: No such file or directory
find: ‘lib64’: No such file or directory
find: ‘opt’: No such file or directory
find: ‘sbin’: No such file or directory
session saved
I see nothing consistent in the file names to cause the sed error. :wall:

A "set -x;" might have been a better option. Maybe tomorrow.

User avatar
ncmprhnsbl
DEV Team
DEV Team
Posts: 4290
Joined: 20 Mar 2012, 03:42
Distribution: v5.0-64bit
Location: australia
Contact:

dump-session: too many error messages

Post#15 by ncmprhnsbl » 05 Jul 2024, 07:26

Ed_P wrote:
05 Jul 2024, 06:42
sed: -e expression #4, char 1: unknown command: `_'
looking again, i see a typo in line 20:

Code: Select all

fixwh() { sed -e 's_\._\\._g' -e 's_?_\\?_g' -e 's_+_\\+_g' -e '_*_\\*_g' -e 's_\$_\\$_g' -e 's_\[_\\[_g' -e 's_(_\\(_g'  -e 's_\&_\\&_g' -e 's@^@^@'; }
missing an s in expression #4

Code: Select all

fixwh() { sed -e 's_\._\\._g' -e 's_?_\\?_g' -e 's_+_\\+_g' -e 's_*_\\*_g' -e 's_\$_\\$_g' -e 's_\[_\\[_g' -e 's_(_\\(_g'  -e 's_\&_\\&_g' -e 's@^@^@'; }
and did you use the suggested edit from dump-session: too many error messages (Post by ncmprhnsbl #99847) ?
Forum Rules : https://forum.porteus.org/viewtopic.php?f=35&t=44

Post Reply